GetResponseStream Method
Collapse the table of content
Expand the table of content

WebResponse.GetResponseStream Method

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

When overridden in a descendant class, returns the data stream from the Internet resource.

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

public virtual Stream GetResponseStream()

Return Value

Type: System.IO.Stream
An instance of the Stream class for reading data from the Internet resource.

ExceptionCondition
NotSupportedException

Any attempt is made to access the method, when the method is not overridden in a descendant class.

The GetResponseStream method returns the data stream from the Internet resource.

NoteNote:

The response stream must be closed to avoid running out of system resources. The response stream can be closed by calling Stream.Close or Close

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft