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

System.Net.WebRequest.EndGetRequestStream Method

Returns a System.IO.Stream for writing data to the resource identified by the WebRequest.RequestUri property of the current instance. [Edit]

public virtual System.IO.Stream EndGetRequestStream (IAsyncResult asyncResult)

Parameters

asyncResult
A IAsyncResult object that references a request for a System.IO.Stream started with WebRequest.BeginGetRequestStream(AsyncCallback, object) . [Edit]

Returns

A System.IO.Stream to write data to. [Edit]

Exceptions

TypeReason
NotSupportedExceptionThis method is not overridden in the derived class. [Edit]
ArgumentExceptionasyncResult was not returned by a call to WebRequest.BeginGetRequestStream(AsyncCallback, object). [Edit]
ArgumentNullExceptionasyncResult is a null reference. [Edit]
InvalidOperationException

This method was called previously using asyncResult.

-or-

No stream is available.

[Edit]
System.Net.WebExceptionAn error occurred while processing the request. [Edit]

Remarks

This method completes an asynchronous request for a stream that was started by the WebRequest.BeginGetRequestStream(AsyncCallback, object) method.

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 must be overridden by classes that inherit from System.Net.WebRequest to provide this functionality.

Usage

Use this method to complete an asynchronous request for a stream that was started with the WebRequest.BeginGetRequestStream(AsyncCallback, object) method.

[Edit]

Requirements

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