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

System.Net.HttpWebRequest.EndGetRequestStream Method

Completes an asynchronous request for a stream that was started by the HttpWebRequest.BeginGetRequestStream(AsyncCallback, object) method. [Edit]

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

Parameters

asyncResult
The IAsyncResult object that holds the state information for the asynchronous operation. [Edit]

Returns

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

Exceptions

TypeReason
ArgumentNullExceptionasyncResult is null. [Edit]
ArgumentExceptionasyncResult was not returned by the current instance from a call to WebRequest.BeginGetRequestStream(AsyncCallback, object). [Edit]
InvalidOperationException

This method was called previously using asyncResult.

-or-

No stream is available.

[Edit]
System.Net.WebException

HttpWebRequest.Abort was previously called.

-or-

An error occurred while processing the request.

[Edit]

Remarks

Note:

The caller is responsible for calling the System.IO.Stream.Close method to close the stream.

This method overrides WebRequest.EndGetRequestStream(IAsyncResult).

[Edit]

Requirements

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