Networking System [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ] 1.0.x.x 1.0.5000.0 2.0.0.0 All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe. System.Net.WebResponse

Provides an HTTP-specific implementation of the class.

The class contains support for the properties and methods included in with additional elements that enable the user to interact directly with the Hypertext Transfer Protocol (HTTP).

Expected usage is that instances of this class are not created directly but are obtained by calling . To obtain the response from the Internet resource as a , call the method.

Certain HTTP headers are protected such that the user cannot set them directly in the header collection. Instead, these headers can be set via the properties of the class or are set by the system. The following table details these protected headers.

Header
Set by
Accept
Connection

Content-Length
Content-Type
Expect
Date
Set to current date by the system.
Host
Set to current host by the system.
if-Modified-since
Range
Referer
Transfer-Encoding

User-Agent
- Constructor
  To be added.
  To be added.
  To be added.
  To be added.
  1.0.5000.0
  2.0.0.0
  System.Obsolete("Serialization is obsoleted for this type", false)
- Property
  System.String

  Gets the character set used for the current instance.

  A that represents the character set used for the current instance.

  This property is read-only.

  For detailed information about character sets, see Section 3.4 of RFC 2616.

  The current instance has been disposed. 0 1.0.5000.0 2.0.0.0
- Method
  System.Void

  Closes the response stream.

  The method closes the response stream and releases the connection to the Internet resource for reuse by other requests.

  Call either the or method to close the stream and release the connection for reuse. It is not necessary to call both and , but doing so does not cause an error. Failure to close the stream might cause an application to run out of connections.

  This method overrides .

  0
  1.0.5000.0
  2.0.0.0
- Property
  System.String

  Gets the method used to encode the body of the response.

  A that describes the method used to encode the body of the response.

  This property is read-only.

  The property contains the value of the header returned with the response.

  For detailed information about content encoding, see Section 3.5 of RFC 2616.

  The current instance has been disposed. 0 1.0.5000.0 2.0.0.0
- Property
  System.Int64

  Gets the content length of the response data being received.

  A containing the number of bytes returned from the Internet resource. This value does not include header information.

  This property is read-only.

  The property contains the value of the header returned with the response. If the header is not set in the response, is set to the value -1.

  This property overrides .

  The current instance has been disposed. 0 1.0.5000.0 2.0.0.0
- Property
  System.String

  Gets the content type of the response.

  A that represents the content type of the response data.

  This property is read-only.

  The property contains the value of the header returned with the response.

  This property overrides .

  The current instance has been disposed. 0 1.0.5000.0 2.0.0.0
- Property
  System.Net.CookieCollection To be added. To be added. To be added. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` to release both managed and unmanaged resources; to release only unmanaged resources.

  Releases the unmanaged resources used by the current instance and optionally releases the managed resources.

  When is , this method releases all resources held by any managed objects that the current instance references.

  When overriding (), be careful not to reference objects that have been previously disposed in an earlier call to as may be called multiple times by other objects. .

  0
  1.0.5000.0
- Method
  System.Int32

  Generates a hash code for the current instance.

  A containing the hash code for the current instance.

  The algorithm used to generate the hash code is unspecified.

  This method overrides .

  The current instance has been disposed. 0 1.0.5000.0
- Method
  2.0.0.0
  System.Void `` `` To be added. To be added. To be added. To be added.
- Method
  System.String `` A that specifies the header value to return.

  Returns a specified header from the current response.

  A containing the value of the specified header.

  To be added. The current instance has been disposed. 0 1.0.5000.0 2.0.0.0
- Method
  System.IO.Stream

  Returns a for reading the body of the response from the server.

  A containing the body of the response.

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

  Call either the or method to close the stream and release the connection for reuse. It is not necessary to call both and , but doing so does not cause an error. Failure to close the stream might cause an application to run out of connections.

  This method overrides .

  The current instance has been disposed. 0 1.0.5000.0 2.0.0.0
- Property
  System.Net.WebHeaderCollection

  Gets the headers associated with the current response from the server.

  A containing the header information returned with the response.

  This property is read-only.

  The property is a collection of name/value pairs containing the HTTP header values returned with the response. The following table lists common headers and the properties that store their values.

  Header
  Property
  Content-Encoding
  Content-Length
  Content-Type
  Last-Modified
  Server

  This property overrides .

  The current instance has been disposed. 0 1.0.5000.0 2.0.0.0
- Property
  2.0.0.0
  System.Boolean To be added. To be added. To be added.
- Property
  System.DateTime

  Gets the last date and time that the contents of the response were modified.

  A value containing the date and time the contents of the response were modified.

  This property is read-only.

  The property contains the value of the header received with the response.

  The current instance has been disposed. 0 1.0.5000.0 2.0.0.0
- Property
  System.String

  Gets the method used to return the response.

  A that represents the HTTP method used to return the response.

  This property is read-only.

  The property can be set to any of the HTTP 1.1 protocol methods: GET, HEAD, POST, PUT, DELETE, TRACE, or OPTIONS. The following table describes these methods.

  Item
  Description
  GET
  Retrieves in entity-body form the information identified by the property of the request associated with the current instance.
  HEAD
  Identical to GET except that the message-body is not returned in the response.
  POST
  Requests that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified the Request-URI in the Request-Line.
  PUT
  Requests that the enclosed entity be stored under the supplied Request-URI.
  DELETE
  Requests that the origin server delete the resource identified by the Request-URI.
  TRACE
  Invokes a remote, application-layer loopback of the request message.
  OPTIONS
  Requests information about the communication options available on the request/response chain identified by the Request-URI. This allows the client to determine the options and/or requirements associated with a resource, or the capabilities of a server, without implying a resource action or initiating a resource retrieval.

  For detailed information regarding these methods, see sections 9.2 to 9.8 of RFC 2616.

  The current instance has been disposed. 0 1.0.5000.0 2.0.0.0
- Property
  System.Version

  Gets the version of the HTTP protocol used in the response.

  A that contains the HTTP protocol version of the response.

  This property is read-only.

  The property contains the number of the response sent by the Internet resource.

  The current instance has been disposed. 0 1.0.5000.0 2.0.0.0
- Property
  System.Uri

  Gets the of the Internet resource that actually responded to the request.

  A representing the resource that actually responded to the request.

  This property is read-only.

  The property contains the URI of the Internet resource that actually responded to the request. This URI might not be the same as the originally requested URI if the request was redirected by the original server.

  This method overrides .

  The current instance has been disposed. 0 1.0.5000.0 2.0.0.0
- Property
  System.String

  Gets the name of the server that sent the response.

  A containing the name of the server that sent the response.

  This property is read-only.

  The property contains the value of the header returned with the response.

  The current instance has been disposed. 0 1.0.5000.0 2.0.0.0
- Property
  System.Net.HttpStatusCode

  Gets the status of the response.

  A value.

  This property is read-only.

  The value indicates the status of the HTTP response. The expected values are defined in the enumeration.

  The current instance has been disposed. 0 1.0.5000.0 2.0.0.0
- Property
  System.String

  Gets the status description returned with the response.

  A that describes the status of the response.

  This property is read-only.

  The current instance has been disposed. 0 1.0.5000.0 2.0.0.0
- Method
  1.0.5000.0
  2.0.0.0
  System.Void To be added. To be added.
- Method
  1.0.5000.0
  2.0.0.0
  System.Void `` `` To be added. To be added. To be added. To be added.
0