GetRequestStreamAsync Method
Collapse the table of content
Expand the table of content

HttpWebRequest.GetRequestStreamAsync Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

When overridden in a descendent class, returns a Stream for writing data to the Internet resource as an asynchronous operation.

Namespace:  System.Net
Assembly:  System.Net (in System.Net.dll)

'Declaration
Public Overrides Function GetRequestStreamAsync As Task(Of Stream)

Return Value

Type: System.Threading.Tasks.Task(Of Stream)
Returns the Task(Of TResult) object representing the asynchronous operation.

After you call GetRequestStreamAsync, make sure you close the request stream before you call GetResponseAsync. Otherwise a System.NotSupportedException is raised.

Windows Phone OS

Supported in: 8.1

Show:
© 2017 Microsoft