[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Returns a response from an Internet resource.
Assembly: System.Http (in System.Http.dll)
The method returns a WebResponse object that contains the response from the Internet resource. The actual instance returned is an HttpWebResponse, and can be typecast to that class to access HTTP-specific properties.
You must call the method to close the stream and release the connection. Failure to do so may cause your application to run out of connections.
When using the POST method, you must get the request stream, write the data to be posted, and close the stream. This method blocks waiting for content to post; if there is no time-out set and you do not provide content, the calling thread blocks indefinitely.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.