Mono Class Library: System.Net.WebRequest Overview | Members

System.Net.WebRequest.GetRequestStream Method

Returns a System.IO.Stream for writing data to a resource. [Edit]

public virtual System.IO.Stream GetRequestStream ()

Returns

A System.IO.Stream for writing data to a resource. [Edit]

Exceptions

TypeReason
NotSupportedExceptionThis method is not overridden in the derived class. [Edit]

Remarks

Operation
As described above.

The System.Net.WebRequest class is abstract and does not provide an implementation for this method. This method throws NotSupportedException.

Note to Inheritors
This method is required to be overridden by classes that inherit from System.Net.WebRequest.

Usage

Use this method to initiate a request to send data to a resource and obtain a System.IO.Stream instance for sending data to that resource.

The WebRequest.GetRequestStream method provides synchronous access to the System.IO.Stream. For asynchronous access, use the WebRequest.BeginGetRequestStream(AsyncCallback, object) and WebRequest.EndGetRequestStream(IAsyncResult) methods.

[Edit]

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0