FormPostHttpBody.WriteHttpBody Method
Writes the HTTP body stream.
Namespace: Microsoft.VisualStudio.TestTools.WebTesting
Assembly: Microsoft.VisualStudio.QualityTools.WebTestFramework (in Microsoft.VisualStudio.QualityTools.WebTestFramework.dll)
Syntax
'Declaration
Public Sub WriteHttpBody ( _
request As WebTestRequest, _
bodyStream As Stream _
)
public void WriteHttpBody(
WebTestRequest request,
Stream bodyStream
)
public:
virtual void WriteHttpBody(
WebTestRequest^ request,
Stream^ bodyStream
) sealed
abstract WriteHttpBody :
request:WebTestRequest *
bodyStream:Stream -> unit
override WriteHttpBody :
request:WebTestRequest *
bodyStream:Stream -> unit
public final function WriteHttpBody(
request : WebTestRequest,
bodyStream : Stream
)
Parameters
request
Type: Microsoft.VisualStudio.TestTools.WebTesting.WebTestRequestUsed to define the encoding of non-ASCII characters.
bodyStream
Type: StreamThe stream to add the form post HTTP body.
Implements
IHttpBody.WriteHttpBody(WebTestRequest, Stream)
Remarks
This creates a stream that contains the parameter names and values found in the FormPostParameterCollection returned by FormPostParameters if the ContentType is URL encoded. Otherwise, it returns a stream representing multipart/form-data ContentType.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.