GetRequestStream Method
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Gets a Stream object to use to write request data.
Namespace: System.Net
Assembly: System.Http (in System.Http.dll)
Syntax
'Declaration
Public Overrides Function GetRequestStream As Stream
public override Stream GetRequestStream()
public:
virtual Stream^ GetRequestStream() override
abstract GetRequestStream : unit -> Stream
override GetRequestStream : unit -> Stream
public override function GetRequestStream() : Stream
Return Value
Type: System.IO. . :: . .Stream
A Stream to use to write request data.
Remarks
The GetRequestStream method returns a stream to use to send data for the HttpWebRequest. After the Stream object has been returned, you can send data with the HttpWebRequest by using the Stream..::..Write method.
If an application needs to set the value of the ContentLength property, then this must be done before retrieving the stream.
You must call the Stream..::..Close method to close the stream and release the connection for reuse. Failure to close the stream causes your application to run out of connections.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.