Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
Silverlight
Silverlight 3
Collapse All/Expand All Collapse All
.NET Framework Class Library for Silverlight
HttpWebResponse Class

Provides an HTTP-specific implementation of the WebResponse class.

Namespace:  System.Net
Assembly:  System.Net (in System.Net.dll)
Visual Basic (Declaration)
Public MustInherit Class HttpWebResponse _
    Inherits WebResponse
Visual Basic (Usage)
Dim instance As HttpWebResponse
C#
public abstract class HttpWebResponse : WebResponse

This class contains support for HTTP-specific uses of the properties and methods of the WebResponse class. The HttpWebResponse class is used to build HTTP stand-alone client applications that send HTTP requests and receive HTTP responses.

You should never directly create an instance of the HttpWebResponse class. Instead, use the instance returned by a call to HttpWebRequest..::.BeginGetResponse.

You must call either the Close or Stream..::.Close method to close the response and release the connection for reuse. It is not necessary to call both the Close and the Stream..::.Close method, but doing so does not cause an error.

Common header information returned from the Internet resource is exposed as properties of the class. See the following table for a complete list. Headers for the request can be read from the Headers property as name/value pairs.

The following table shows the values that are available through properties of the HttpWebResponse class.

Header

Property

HTTP method

Method

Status code

StatusCode

Status description

StatusDescription

The contents of the response from the Internet resource are returned as a Stream by calling the GetResponseStream method.

System..::.Object
  System.Net..::.WebResponse
    System.Net..::.HttpWebResponse
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker