Mono Class Library: System.Net.WebRequest Overview | MembersSystem.Net.WebRequest.BeginGetRequestStream Method |
Begins an asynchronous request for a stream in which to write data to be sent in the current request. [Edit]
|
- callback
- A AsyncCallback delegate to be called when the stream is available. Can be null . [Edit]
- state
- A object containing state information for the asynchronous request. [Edit]
A IAsyncResult object that contains information about the asynchronous operation. [Edit]
Type Reason NotSupportedException This method is not overridden in the derived class. [Edit]
The state parameter can be any object that the caller wishes to have available for the duration of the asynchronous operation. This object is available via the IAsyncResult.AsyncState property of the object returned by this method.
Operation
This method starts an asynchronous operation to obtain a stream used to write data to be sent in the current request. To get the request stream, call the WebRequest.EndGetRequestStream(IAsyncResult) method and specify the IAsyncResult object returned by this method.
If the callback parameter is not null , the method referenced by callback is invoked when the asynchronous operation completes. The IAsyncResult object returned by this method is passed as the argument to the method referenced by callback.
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 start an asynchronous request for a stream used to send data to a resource. The callback delegate can call the WebRequest.EndGetRequestStream(IAsyncResult) method to obtain the request stream. [Edit]
Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0