Response Property
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Gets the response that the remote host returned.
Namespace: System.Net
Assembly: System.Http (in System.Http.dll)
Syntax
'Declaration
Public ReadOnly Property Response As WebResponse
public WebResponse Response { get; }
public:
property WebResponse^ Response {
WebResponse^ get ();
}
member Response : WebResponse with get
function get Response () : WebResponse
Property Value
Type: System.Net. . :: . .WebResponse
If a response is available from the Internet resource, a WebResponse instance that contains the error response from an Internet resource; otherwise, nullNothingnullptrunita null reference (Nothing in Visual Basic).
Remarks
Some Internet protocols, such as HTTP, return otherwise valid responses indicating that an error has occurred at the protocol level. When the response to an Internet request indicates an error, WebRequest..::..GetResponse sets the Status property to WebExceptionStatus..::..ProtocolError and provides the WebResponse that contains the error message in the Response property of the WebException that was thrown. The application can examine the WebResponse to determine the actual error.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.