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 4.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.WebRequest System.Runtime.Serialization.ISerializable

The class provides support for the properties and methods defined in and for additional properties and methods that enable the user to interact directly with servers using HTTP.

Do not use the constructor. Use the method to initialize new objects. If the scheme for the Uniform Resource Identifier (URI) is http:// or https://, returns an object.

The method makes a synchronous request to the resource specified in the property and returns an that contains the response. You can make an asynchronous request to the resource using the and methods.

When you want to send data to the resource, the method returns a object to use to send data. The and methods provide asynchronous access to the send data stream.

For client authentication with , the client certificate must be installed in the My certificate store of the current user.

The class throws a when errors occur while accessing a resource. The property contains a value that indicates the source of the error. When is , the property contains the received from the resource.

exposes common HTTP header values sent to the Internet resource as properties, set by methods, or set by the system; the following table contains a complete list. You can set other headers in the property as name/value pairs. Note that servers and caches may change or add headers during the request.

The following table lists the HTTP headers that are set either by properties or methods or the system.

Header

Set by

Accept

Set by the property.

Connection

Set by the property, property.

Content-Length

Set by the property.

Content-Type

Set by the property.

Expect

Set by the property.

Date

Set by the system to current date.

Host

Set by the system to current host information.

If-Modified-Since

Set by the property.

Range

Set by the method.

Referer

Set by the property.

Transfer-Encoding

Set by the property (the property must be true).

User-Agent

Set by the property.

is registered automatically. You do not need to call the method to register before using URIs beginning with http:// or https://.

The local computer or application config file may specify that a default proxy be used. If the property is specified, then the proxy settings from the property override the local computer or application config file and the instance will use the proxy settings specified. If no proxy is specified in a config file and the property is unspecified, the class uses the proxy settings inherited from Internet Explorer on the local computer. If there are no proxy settings in Internet Explorer, the request is sent directly to the server.

The class parses a proxy bypass list with wildcard characters inherited from Internet Explorer differently than the bypass list is parsed directly by Internet Explorer. For example, the class will parse a bypass list of "nt*" from Internet Explorer as a regular expression of "nt.$". This differs from the native behavior of Internet Explorer. So a URL of "http://intxxxxx" would bypass the proxy using the class, but would not bypass the proxy using Internet Explorer.

The Framework caches SSL sessions as they are created and attempts to reuse a cached session for a new request, if possible. When attempting to reuse an SSL session, the Framework uses the first element of (if there is one), or tries to reuse an anonymous sessions if is empty.

For security reasons, cookies are disabled by default. If you want to use cookies, use the property to enable cookies.

Provides an HTTP-specific implementation of the class.

- Constructor
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Obsolete("Serialization is obsoleted for this type", false)

  An application must run in full trust mode when using serialization.

  Initializes a new instance of the class from the specified instances of the and classes.

  A object that contains the information required to serialize the new object.
  A object that contains the source and destination of the serialized stream associated with the new object.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void

  The method cancels a request to a resource. After a request is canceled, calling the , , , , , or method causes a with the property set to .

  The method will synchronously execute the callback specified to the or methods if the method is called while either of these operations are outstanding. This can lead to potential deadlock issues.

  This member outputs trace information when you enable network tracing in your application. For more information, see Network Tracing.

  Cancels a request to an Internet resource.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String

  A containing the value of the HTTP Accept header. The default value of this property is .

  To clear the Accept HTTP header, set the property to null.

  The value for this property is stored in . If WebHeaderCollection is set, the property value is lost.

  Gets or sets the value of the Accept HTTP header.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` The range header could not be added.

  The method adds a byte range header to the request.

  If is positive, the parameter specifies the starting point of the range. The server should start sending data from the parameter specified to the end of the data in the HTTP entity.

  If is negative, the parameter specifies the ending point of the range. The server should start sending data from the start of the data in the HTTP entity to the parameter specified.

  Since all HTTP entities are represented in HTTP messages as sequences of bytes, the concept of a byte range is meaningful for any HTTP entity. However, not all clients and servers need to support byte-range operations.

  The Range header on a request allows a client to request that it only wants to receive some part of the specified range of bytes in an HTTP entity. Servers are not required to support Range header requests.

  An example of a Range header in an HTTP protocol request that requests the server send the first 100 bytes (from the start to byte position 99) would be the following:

  Range: bytes=0-99\r\n\r\n

  For this example, the parameter would be -99.

  A HTTP server indicates support for Range headers with the Accept-Ranges header. An example of the Accept-Ranges header from a server that supports byte-ranges would be as follows:

  Accept-Ranges: bytes\r\n\r\n

  If an Accept-Ranges header is not received in the header of the response from the server, then the server does not support Range headers. An example of the Accept-Ranges header from a server that does not support ranges, but recognizes the Accept-Ranges header, would be as follows:

  Accept-Ranges: none\r\n\r\n

  When receiving the response from a range request, only the HTTP headers associated with the entire request are parsed and made available via properties on the class. Headers associated with each range are returned in the response.

  Adds a byte range header to a request for a specific range from the beginning or end of the requested data.

  The starting or ending point of the range. 0
- Method
  4.0.0.0
  System.Void ``

  The method adds a byte range header to the request.

  If is positive, the parameter specifies the starting point of the range. The server should start sending data from the parameter specified to the end of the data in the HTTP entity.

  If is negative, the parameter specifies the ending point of the range. The server should start sending data from the start of the data in the HTTP entity to the parameter specified.

  Since all HTTP entities are represented in HTTP messages as sequences of bytes, the concept of a byte range is meaningful for any HTTP entity. However, not all clients and servers need to support byte-range operations.

  The Range header on a request allows a client to request that it only wants to receive some part of the specified range of bytes in an HTTP entity. Servers are not required to support Range header requests.

  An example of a Range header in an HTTP protocol request that requests the server send the first 100 bytes (from the start to byte position 99) would be the following:

  Range: bytes=0-99\r\n\r\n

  For this example, the parameter would be -99.

  A HTTP server indicates support for Range headers with the Accept-Ranges header. An example of the Accept-Ranges header from a server that supports byte-ranges would be as follows:

  Accept-Ranges: bytes\r\n\r\n

  If an Accept-Ranges header is not received in the header of the response from the server, then the server does not support Range headers. An example of the Accept-Ranges header from a server that does not support ranges, but recognizes the Accept-Ranges header, would be as follows:

  Accept-Ranges: none\r\n\r\n

  When receiving the response from a range request, only the HTTP headers associated with the entire request are parsed and made available via properties on the class. Headers associated with each range are returned in the response.

  Adds a byte range header to a request for a specific range from the beginning or end of the requested data.

  The starting or ending point of the range.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  < 0.

  -or-

  < 0.

  -or-

  > .

  The range header could not be added.

  The method adds a byte range header to the request.

  Since all HTTP entities are represented in HTTP messages as sequences of bytes, the concept of a byte range is meaningful for any HTTP entity. However, not all clients and servers need to support byte-range operations.

  The Range header on a request allows a client to request that it only wants to receive some part of the specified range of bytes in an HTTP entity. Servers are not required to support Range header requests.

  An example of a Range header in an HTTP protocol request that requests the first 100 bytes would be would be the following:

  Range: bytes=0-99\r\n\r\n

  For this example, the parameter would be specified as 0 and the parameter would be specified as 99. The range specifier is automatically set as "bytes" by this method.

  A HTTP server indicates support for Range headers with the Accept-Ranges header. An example of the Accept-Ranges header from a server that supports byte-ranges would be as follows:

  Accept-Ranges: bytes\r\n\r\n

  If an Accept-Ranges header is not received in the header of the response from the server, then the server does not support Range headers. An example of the Accept-Ranges header from a server that does not support ranges, but recognizes the Accept-Ranges header, would be as follows:

  Accept-Ranges: none\r\n\r\n

  When receiving the response from a range request, only the HTTP headers associated with the entire request are parsed and made available via properties on the class. Headers associated with each range are returned in the response.

  Adds a byte range header to the request for a specified range.

  The position at which to start sending data. The position at which to stop sending data. 0
- Method
  4.0.0.0
  System.Void `` ``

  The method adds a byte range header to the request.

  Since all HTTP entities are represented in HTTP messages as sequences of bytes, the concept of a byte range is meaningful for any HTTP entity. However, not all clients and servers need to support byte-range operations.

  The Range header on a request allows a client to request that it only wants to receive some part of the specified range of bytes in an HTTP entity. Servers are not required to support Range header requests.

  An example of a Range header in an HTTP protocol request that requests the first 100 bytes would be would be the following:

  Range: bytes=0-99\r\n\r\n

  For this example, the parameter would be specified as 0 and the parameter would be specified as 99. The range specifier is automatically set as "bytes" by this method.

  A HTTP server indicates support for Range headers with the Accept-Ranges header. An example of the Accept-Ranges header from a server that supports byte-ranges would be as follows:

  Accept-Ranges: bytes\r\n\r\n

  If an Accept-Ranges header is not received in the header of the response from the server, then the server does not support Range headers. An example of the Accept-Ranges header from a server that does not support ranges, but recognizes the Accept-Ranges header, would be as follows:

  Accept-Ranges: none\r\n\r\n

  When receiving the response from a range request, only the HTTP headers associated with the entire request are parsed and made available via properties on the class. Headers associated with each range are returned in the response.

  Adds a byte range header to the request for a specified range.

  The position at which to start sending data. The position at which to stop sending data.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` is . is invalid. The range header could not be added.

  The method adds a Range header to the request.

  If is positive, the parameter specifies the starting point of the range. The server should start sending data from the parameter specified to the end of the data in the HTTP entity.

  If is negative, the parameter specifies the ending point of the range. The server should start sending data from the start of the data in the HTTP entity to the parameter specified.

  Since all HTTP entities are represented in HTTP messages as sequences of bytes, the concept of a byte range is meaningful for any HTTP entity. However, not all clients and servers need to support byte-range operations.

  The Range header on a request allows a client to request that it only wants to receive some part of the specified range of bytes in an HTTP entity. Servers are not required to support Range header requests.

  The parameter would normally be specified as a "bytes", since this is the only range specifier recognized by most HTTP servers. Setting the parameter to some other string allows support for custom range specifiers other than bytes (the byte-range specifier defined in RFC 2616 by the IETF).

  An example of a Range header in an HTTP protocol request that requests the first 100 bytes would be would be the following:

  Range: bytes=-99\r\n\r\n

  For this example, the parameter would be specified as "bytes" and the parameter would be -99.

  A HTTP server indicates support for Range headers with the Accept-Ranges header in the response. An example of the Accept-Ranges header from a server that supports byte-ranges would be as follows:

  Accept-Ranges: bytes\r\n\r\n

  If an Accept-Ranges header is not received in the header of the response from the server, then the server does not support Range headers. An example of the Accept-Ranges header from a server that does not support ranges, but recognizes the Accept-Ranges header, would be as follows:

  Accept-Ranges: none\r\n\r\n

  When receiving the response from a range request, only the HTTP headers associated with the entire request are parsed and made available via properties on the class. Headers associated with each range are returned in the response.

  Adds a Range header to a request for a specific range from the beginning or end of the requested data.

  The description of the range. The starting or ending point of the range. 0
- Method
  4.0.0.0
  System.Void `` ``

  The method adds a Range header to the request.

  If is positive, the parameter specifies the starting point of the range. The server should start sending data from the parameter specified to the end of the data in the HTTP entity.

  If is negative, the parameter specifies the ending point of the range. The server should start sending data from the start of the data in the HTTP entity to the parameter specified.

  Since all HTTP entities are represented in HTTP messages as sequences of bytes, the concept of a byte range is meaningful for any HTTP entity. However, not all clients and servers need to support byte-range operations.

  The Range header on a request allows a client to request that it only wants to receive some part of the specified range of bytes in an HTTP entity. Servers are not required to support Range header requests.

  The parameter would normally be specified as a "bytes", since this is the only range specifier recognized by most HTTP servers. Setting the parameter to some other string allows support for custom range specifiers other than bytes (the byte-range specifier defined in RFC 2616 by the IETF).

  An example of a Range header in an HTTP protocol request that requests the first 100 bytes would be would be the following:

  Range: bytes=-99\r\n\r\n

  For this example, the parameter would be specified as "bytes" and the parameter would be -99.

  A HTTP server indicates support for Range headers with the Accept-Ranges header in the response. An example of the Accept-Ranges header from a server that supports byte-ranges would be as follows:

  Accept-Ranges: bytes\r\n\r\n

  If an Accept-Ranges header is not received in the header of the response from the server, then the server does not support Range headers. An example of the Accept-Ranges header from a server that does not support ranges, but recognizes the Accept-Ranges header, would be as follows:

  Accept-Ranges: none\r\n\r\n

  When receiving the response from a range request, only the HTTP headers associated with the entire request are parsed and made available via properties on the class. Headers associated with each range are returned in the response.

  Adds a Range header to a request for a specific range from the beginning or end of the requested data.

  The description of the range. The starting or ending point of the range.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` `` is .

  < 0.

  -or-

  < 0.

  -or-

  > .

  is invalid. The range header could not be added.

  The method adds a Range header to the request.

  Since all HTTP entities are represented in HTTP messages as sequences of bytes, the concept of a byte range is meaningful for any HTTP entity. However, not all clients and servers need to support byte-range operations.

  The Range header on a request allows a client to request that it only wants to receive some part of the specified range of bytes in an HTTP entity. Servers are not required to support Range header requests.

  The parameter would normally be specified as a "bytes", since this is the only range specifier recognized by most HTTP servers. Setting the parameter to some other string allows support for custom range specifiers other than bytes (the byte-range specifier defined in RFC 2616 by the IETF).

  An example of a Range header in an HTTP protocol request that requests the first 100 bytes would be would be the following:

  Range: bytes=0-99\r\n\r\n

  For this example, the parameter would be specified as a "bytes", the parameter would be 0, and the parameter would be 99.

  A HTTP server indicates support for Range headers with the Accept-Ranges header in the response. An example of the Accept-Ranges header from a server that supports byte-ranges would be as follows:

  Accept-Ranges: bytes\r\n\r\n

  The string specified in the Accept-Ranges header is the range-specifier that would be by specified in the parameter for this method.

  If an Accept-Ranges header is not received in the header of the response from the server, then the server does not support Range headers. An example of the Accept-Ranges header from a server that does not support ranges, but recognizes the Accept-Ranges header, would be as follows:

  Accept-Ranges: none\r\n\r\n

  When receiving the response from a range request, only the HTTP headers associated with the entire request are parsed and made available via properties on the class. Headers associated with each range are returned in the response.

  Adds a range header to a request for a specified range.

  The description of the range. The position at which to start sending data. The position at which to stop sending data. 0
- Method
  4.0.0.0
  System.Void `` `` ``

  The method adds a Range header to the request.

  Since all HTTP entities are represented in HTTP messages as sequences of bytes, the concept of a byte range is meaningful for any HTTP entity. However, not all clients and servers need to support byte-range operations.

  The Range header on a request allows a client to request that it only wants to receive some part of the specified range of bytes in an HTTP entity. Servers are not required to support Range header requests.

  The parameter would normally be specified as a "bytes", since this is the only range specifier recognized by most HTTP servers. Setting the parameter to some other string allows support for custom range specifiers other than bytes (the byte-range specifier defined in RFC 2616 by the IETF).

  An example of a Range header in an HTTP protocol request that requests the first 100 bytes would be would be the following:

  Range: bytes=0-99\r\n\r\n

  For this example, the parameter would be specified as a "bytes", the parameter would be 0, and the parameter would be 99.

  A HTTP server indicates support for Range headers with the Accept-Ranges header in the response. An example of the Accept-Ranges header from a server that supports byte-ranges would be as follows:

  Accept-Ranges: bytes\r\n\r\n

  The string specified in the Accept-Ranges header is the range-specifier that would be by specified in the parameter for this method.

  If an Accept-Ranges header is not received in the header of the response from the server, then the server does not support Range headers. An example of the Accept-Ranges header from a server that does not support ranges, but recognizes the Accept-Ranges header, would be as follows:

  Accept-Ranges: none\r\n\r\n

  When receiving the response from a range request, only the HTTP headers associated with the entire request are parsed and made available via properties on the class. Headers associated with each range are returned in the response.

  Adds a range header to a request for a specified range.

  The description of the range. The position at which to start sending data. The position at which to stop sending data.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Uri

  A identifying the Internet resource that responds to the current request. The default is the URI used by the method to initialize the current instance.

  The property is set to the URI after any redirections that happen during the request are complete.

  The URI of the original request is kept in the property.

  Gets the Uniform Resource Identifier (URI) of the Internet resource that actually responds to the request.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean

  if the current request will automatically follow redirection responses from the Internet resource; otherwise . The default value is .

  Set to true if you want the request to automatically follow HTTP redirection headers to the new location of the resource. The maximum number of redirections to follow is set by the property.

  If is set to false, all responses with an HTTP status code from 300 to 399 is returned to the application.

  The Authorization header is cleared on auto-redirects and automatically tries to re-authenticate to the redirected location. In practice, this means that an application can't put custom authentication information into the Authorization header if it is possible to encounter redirection. Instead, the application must implement and register a custom authentication module. The and related class are used to implement a custom authentication module. The method registers a custom authentication module.

  Gets or sets a value that indicates whether the request should follow redirection responses.

  0
- Property
  4.0.0.0
  System.Boolean To be added. To be added.

  Gets or sets a value that indicates whether to buffer the received from the Internet resource.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean

  to enable buffering of the data sent to the Internet resource requested by the current instance; to disable buffering. The default is .

  When is true, the data is buffered in memory so it is ready to be resent in the event of redirections or authentication requests.

  Gets or sets a value that indicates whether to buffer the data sent to the Internet resource.

  0
- Property
  2.0.0.0
  4.0.0.0
  System.Net.DecompressionMethods To be added. To be added.

  Gets or sets the type of decompression that is used.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.IAsyncResult `` ``

  The stream is being used by a previous call to .

  -or-

  No writeable stream is available.

  The property of the current instance is not set.

  -or-

  The property of the current instance is "GET" or "HEAD".

  was previously called.

  -or-

  An error occurred while processing the request.

  The method starts an asynchronous request for a stream used to send data for the . The asynchronous callback method uses the method to return the actual stream.

  The method requires some synchronous setup tasks to complete (DNS resolution, proxy detection, and TCP socket connection, for example) before this method becomes asynchronous. As a result, this method should never be called on a user interface (UI) thread because it might take considerable time (up to several minutes depending on network settings) to complete the initial synchronous setup tasks before an exception for an error is thrown or the method succeeds.

  To learn more about the thread pool, see [<topic://cpconthreadpooling>].

  Your application cannot mix synchronous and asynchronous methods for a particular request. If you call the method, you must use the method to retrieve the response.

  This member outputs trace information when you enable network tracing in your application. For more information, see [<topic://conUsingNetworkTracing>].

  Begins an asynchronous request for a object to use to write data.

  An that references the asynchronous request.

  The delegate. The state object for this request. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.IAsyncResult `` `` or was previously called on this instance. The property of the current instance has not been set. was previously called.

  The method starts an asynchronous request for a response from the Internet resource. The asynchronous callback method uses the method to return the actual .

  A is thrown in several cases when the properties set on the class are conflicting. This exception occurs if an application sets the property and the property to true, and then sends an HTTP GET request. This exception occurs if an application tries to send chunked to a server that only supports HTTP 1.0 protocol, where this is not supported. This exception occurs if an application tries to send data without setting the property or the is false when buffering is disabled and on a keepalive connection (the property is true).

  If a is thrown, use the and properties of the exception to determine the response from the server.

  The method requires some synchronous setup tasks to complete (DNS resolution, proxy detection, and TCP socket connection, for example) before this method becomes asynchronous. As a result, this method should never be called on a user interface (UI) thread because it might take considerable time (up to several minutes depending on network settings) to complete the initial synchronous setup tasks before an exception for an error is thrown or the method succeeds.

  To learn more about the thread pool, see [<topic://cpconthreadpooling>].

  Your application cannot mix synchronous and asynchronous methods for a particular request. If you call the method, you must use the method to retrieve the response.

  This member outputs trace information when you enable network tracing in your application. For more information, see [<topic://conUsingNetworkTracing>].

  Begins an asynchronous request to an Internet resource.

  An that references the asynchronous request for a response.

  The delegate The state object for this request. 0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  set: System.MonoTODO
  System.Security.Cryptography.X509Certificates.X509CertificateCollection To be added.

  An application can add a certificate to a collection, but might not have access rights to it. To use a certificate contained in the collection, the application must have the same access rights as the entity that issued the certificate.

  The Framework caches SSL sessions as they are created and attempts to reuse a cached session for a new request, if possible. When attempting to reuse an SSL session, the Framework uses the first element of (if there is one), or tries to reuse an anonymous sessions if is empty.

  For performance reasons, you shouldn't add a client certificate to a unless you know the server will ask for it.

  For a code example illustrating how to enumerate the certificates in the client certificate store, see the class.

  Gets or sets the collection of security certificates that are associated with this request.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String

  A containing the value of the Connection HTTP header. The default value is .

  The value of is set to "Keep-alive" or "Close". This value is case insensitive.

  The request sends the property to the Internet resource as the Connection HTTP header. If the value of the property is true, the value "Keep-alive" is appended to the end of the Connection header.

  To clear the Connection HTTP header, set the property to null.

  Changing the property after the request has been started by calling the , , , or method throws an .

  The value for this property is stored in . If WebHeaderCollection is set, the property value is lost.

  Gets or sets the value of the Connection HTTP header.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String

  A that contains the name of the connection group for the current instance. The default value is .

  The property enables you to associate a request with a connection group. This is useful when your application makes requests to one server for different users, such as a Web site that retrieves customer information from a database server.

  Gets or sets the name of the connection group for the request.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int64

  A value that specifies the number of bytes of data to send to the Internet resource. The default is -1, which indicates that this value has not been set.

  Data has already been written to the request stream. A value less than zero is specified for a set operation.

  The property contains the value to send as the Content-length HTTP header with the request.

  Any value other than -1 in the property indicates that the request uploads data and that only methods that upload data are allowed to be set in the property.

  After the property is set to a value, that number of bytes must be written to the request stream that is returned by calling the method or both the and the methods.

  The value for this property is stored in . If WebHeaderCollection is set, the property value is lost.

  Gets or sets the Content-length HTTP header.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String

  The value of the Content-type HTTP header of the current instance. The default value is .

  The property contains the media type of the request. Values assigned to the property replace any existing contents when the request sends the Content-type HTTP header.

  To clear the Content-type HTTP header, set the property to null.

  The value for this property is stored in . If is set, the property value is lost.

  Gets or sets the value of the Content-type HTTP header.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Net.HttpContinueDelegate

  A that references the methods that are invoked when an HTTP Continue response is received. The default value is .

  The property specifies the callback method to call when the client receives a 100-Continue response.

  When the property is set, the client calls the delegate whenever protocol responses of type (100) are received. This is useful if you want the client to display the status of the data being received from the Internet resource.

  Gets or sets the delegate method called when an HTTP 100-continue response is received from the Internet resource.

  0
- Property
  4.0.0.0
  System.MonoTODO
  System.Int32 To be added.

  If the 100-Continue response is received before the timeout expires, the entity body can be sent.

  Gets or sets a timeout, in milliseconds, to wait until the 100-Continue is received from the server.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Net.CookieContainer To be added.

  The property provides an instance of the class that contains the cookies associated with this request.

  is null by default. You must assign a object to the property to have cookies returned in the property of the returned by the method.

  For security reasons, cookies are disabled by default. If you want to use cookies, use the property to enable cookies.

  Gets or sets the cookies associated with the request.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Net.ICredentials

  A object containing the authentication credentials associated with the current instance. The default is .

  The property contains authentication information to identify the maker of the request. The property can be either a , in which case the user, password, and domain information contained in the object is used to authenticate the request, or it can be a , in which case the Uniform Resource Identifier (URI) of the request is used to determine the user, password, and domain information to use to authenticate the request.

  In most client scenarios, you should use the property, which contains the credentials of the currently logged on user. To do this, set the property to true instead of setting this property.

  If the class is being used in a middle-tier application, such as an ASP.NET application, the credentials in the property belong to the account running the ASP page (the server-side credentials). Typically, you would set this property to the credentials of the client on whose behalf the request is made.

  The NTLM authentication scheme cannot be used to impersonate another user. Kerberos must be specially configured to support impersonation.

  To restrict HttpWebRequest to one or more authentication methods, use the class and bind your credentials to one or more authentication schemes

  Supported authentication schemes include Digest, Negotiate, Kerberos, NTLM, and Basic.

  Gets or sets authentication information for the request.

  0
- Property
  4.0.0.0
  System.DateTime To be added.

  If the Date header is null, then the return value will be set to .

  The property is a standard object and can contain a field of , , or . Any kind of time can be set when using the property. If is set or retrieved, the property is assumed to be (local time).

  The classes in the namespace always write it out the property on the wire during transmission in standard form using GMT (Utc) format.

  If the property is set to , then the Date HTTP header is removed from the property and the .

  If the property is , this indicates that the Date HTTP header is not included in the property and the .

  The value for this property is stored in . If WebHeaderCollection is set, the property value is lost.

  If the is set and an attempt is made to send a with no body, then a will be thrown by the , , and methods.

  Get or set the Date HTTP header value to use in an HTTP request.

- Property
  2.0.0.0
  4.0.0.0
  System.MonoTODO
  System.Net.Cache.RequestCachePolicy To be added.

  Setting this property registers the specified policy for the HTTP and HTTPS schemes. This policy is used for this request if:

  There is no property specified for this request.

  - or -

  The machine and application configuration files do not specify a cache policy that is applicable to the Uniform Resource Identifier (URI) used to create this request.

  The cache policy determines whether the requested resource can be taken from a cache instead of sending the request to the resource host computer.

  A copy of a resource is only added to the cache if the response stream for the resource is retrieved and read to the end of the stream. So another request for the same resource could use a cached copy, depending on the cache policy level for this request.

  Gets or sets the default cache policy for this request.

- Property
  2.0.0.0
  4.0.0.0
  System.MonoTODO
  System.Int32 To be added. To be added.

  Gets or sets the default maximum length of an HTTP error response.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.MonoTODO("Use this")
  System.Int32 To be added.

  The length of the response header received the response status line and any extra control characters that are received as part of HTTP protocol. A value of -1 means no limit is imposed on the response headers received; a value of 0 means that all requests fail.

  This value can also be changed in the configuration file. The impact of this property can be overridden by setting the property on an instance of the class.

  Gets or sets the default for the property.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.IO.Stream `` is . was not returned by the current instance from a call to .

  This method was called previously using

  -or-

  No stream is available.

  was previously called.

  -or-

  An error occurred while processing the request.

  The method completes an asynchronous request for a stream that was started by the method. After the object has been returned, you can send data with the by using the method.

  You must set the value of the property before writing data to the stream.

  You must call the method to close the stream and release the connection for reuse. Failure to close the stream causes your application to run out of connections.

  This member outputs trace information when you enable network tracing in your application. For more information, see [<topic://conUsingNetworkTracing>].

  Ends an asynchronous request for a object to use to write data.

  A to use to write request data.

  The pending request for a stream. 0
- Method
  4.0.0.0
  System.IO.Stream `` `` To be added. To be added. To be added. To be added. To be added.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Net.WebResponse `` is . was not returned by the current instance from a call to .

  This method was called previously using

  -or-

  The property of the current instance is greater than 0 but the data has not been written to the request stream.

  was previously called.

  -or-

  An error occurred while processing the request.

  The method completes an asynchronous request for an Internet resource that was started by calling the method.

  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.

  This member outputs trace information when you enable network tracing in your application. For more information, see [<topic://conUsingNetworkTracing>].

  Ends an asynchronous request to an Internet resource.

  A that contains the response from the Internet resource.

  The pending request for a response. 0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String

  A that contains the contents of the HTTP Expect header. The default value is .

  By default, is . Other values can be added to the list that maintains, or all values except "100-continue" can be deleted from the list by setting to .

  For additional information see section 14.20 of IETF RFC 2616 - HTTP/1.1.

  The value specified for a set operation is "100-continue". This value is case insensitive.

  Gets or sets the value of the Expect HTTP header.

  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 .

  0
  1.0.5000.0
- Method
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  Any objects included in the are automatically tracked and serialized by the formatter.

  Populates a with the data required to serialize the target object.

  The to populate with data. A that specifies the destination for this serialization.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.IO.Stream

  The property of the current instance is "GET" or "HEAD".

  -or-

  The property of the current instance is not set.

  The method was called more than once.

  -or-

  No writeable stream is available.

  was previously called.

  -or-

  The timeout period for the request expired.

  -or-

  An error occurred while processing the request.

  The method returns a stream to use to send data for the . After the object has been returned, you can send data with the by using the method.

  If an application needs to set the value of the property, then this must be done before retrieving the stream.

  You must call the method to close the stream and release the connection for reuse. Failure to close the stream causes your application to run out of connections.

  Your application cannot mix synchronous and asynchronous methods for a particular request. If you call the method, you must use the method to retrieve the response.

  This member outputs trace information when you enable network tracing in your application. For more information, see [<topic://conUsingNetworkTracing>].

  Gets a object to use to write request data.

  A to use to write request data.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Net.WebResponse The property of the current instance is not set.

  was previously called.

  -or-

  The timeout period for the request expired.

  -or-

  An error occurred while processing the request.

  The method returns a object that contains the response from the Internet resource. The actual instance returned is an , and can be typecast to that class to access HTTP-specific properties.

  A is thrown in several cases when the properties set on the class are conflicting. This exception occurs if an application sets the property and the property to true, and then sends an HTTP GET request. This exception occurs if an application tries to send chunked to a server that only supports HTTP 1.0 protocol, where this is not supported. This exception occurs if an application tries to send data without setting the property or the is false when buffering is disabled and on a keepalive connection (the property is true).

  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.

  Multiple calls to return the same response object; the request is not reissued.

  Your application cannot mix synchronous and asynchronous methods for a particular request. If you call the method, you must use the method to retrieve the response.

  If a is thrown, use the and properties of the exception to determine the response from the server.

  This member outputs trace information when you enable network tracing in your application. For more information, see [<topic://conUsingNetworkTracing>].

  For security reasons, cookies are disabled by default. If you wish to use cookies, use the property to enable cookies.

  Returns a response from an Internet resource.

  A that contains the response from the Internet resource.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean

  if a response has been received; otherwise .

  This property is read-only.

  Gets a value that indicates whether a response has been received from an Internet resource.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Net.WebHeaderCollection

  A containing the name/value pairs of the headers for the current instance.

  A set operation was requested but data has already been written to the request data stream.

  The collection contains the protocol headers associated with the request. The following table lists the HTTP headers that are not stored in the collection but are either set by the system or set by properties or methods.

  Header

  Set by

  Accept

  Set by the property.

  Connection

  Set by the property and property.

  Content-Length

  Set by the property.

  Content-Type

  Set by the property.

  Expect

  Set by the property.

  Date

  Set by the property.

  Host

  Set by the property.

  If-Modified-Since

  Set by the property.

  Range

  Set by the method.

  Referer

  Set by the property.

  Transfer-Encoding

  Set by the property (the property must be true).

  User-Agent

  Set by the property.

  The method throws an if you try to set one of these protected headers.

  Changing the property after the request has been started by calling , , , or method throws an .

  You should not assume that the header values will remain unchanged, because Web servers and caches may change or add headers to a Web request.

  Specifies a collection of the name/value pairs that make up the HTTP headers.

  0
- Property
  4.0.0.0
  System.String To be added.

  The property can be used to set the Host header value to use in an HTTP request independent from the request URI. The property can consist of a hostname and an optional port number. A Host header without port information implies the default port for the service requested (port 80 for an HTTP URL, for example).

  The format for specifying a host and port must follow the rules in section 14.23 of RFC2616 published by the IETF. An example complying with these requirements that specifies a port of 8080 would be the following value for the property:

  www.contoso.com:8080

  Using the property to explicitly specify a custom Host header value also affects areas caching, cookies, and authentication. When an application provides credentials for a specific URI prefix, the applications needs to make sure to use the URI containing the value of the Host header, not the target server in the URI. The key used when caching resources, uses the Host header value rather than the request URI. Cookies are stored in a and logically grouped by the server domain name. If the application specifies a Host header, then this value will be used as domain.

  If the property is not set, then the Host header value to use in an HTTP request is based on the request URI.

  Get or set the Host header value to use in an HTTP request independent from the request URI.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.DateTime

  A that contains the contents of the HTTP If-Modified-Since header. The default value is the current date and time of the system.

  The property is a standard object and can contain a field of , , or . Any kind of time can be set when using the property. If is set or retrieved, the property is assumed to be (local time).

  The classes in the namespace always write it out the property on the wire during transmission in standard form using GMT (Utc) format.

  If the property is set to , then the If-Modified-Since HTTP header is removed from the property and the .

  If the property is , this indicates that the If-Modified-Since HTTP header is not included in the property and the .

  The value for this property is stored in . If WebHeaderCollection is set, the property value is lost.

  Gets or sets the value of the If-Modified-Since HTTP header.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean

  indicates that the current request will contain an HTTP Connection header with the value "Keep-alive" ; otherwise, . The default value is .

  Set this property to true to send a Connection HTTP header with the value Keep-alive. An application uses to indicate a preference for persistent connections. When the property is true, the application makes persistent connections to the servers that support them.

  When using HTTP/1.1, Keep-Alive is on by default. Setting to false may result in sending a Connection: Close header to the server.

  Gets or sets a value that indicates whether to make a persistent connection to the Internet resource.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32

  A value that indicates the maximum number of redirection responses that the current instance will follow. The default value is implementation-specific.

  The value specified for a set operation is less than or equal to zero.

  The property sets the maximum number of redirections for the request to follow if the property is true.

  Gets or sets the maximum number of redirects that the request follows.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.MonoTODO("Use this")
  System.Int32 To be added.

  The length of the response header includes the response status line and any extra control characters that are received as part of HTTP protocol. A value of -1 means no limit is imposed on the response headers; a value of 0 means that all requests fail.

  If the property is not explicitly set, it defaults to the value of the property.

  If the length of the response header received exceeds the value of the property, the or methods will throw a with the property set to .

  Gets or sets the maximum allowed length of the response headers.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String

  A that identifies the media type of the current request. The default value is .

  The value of the property affects the property. When you set the in the request, the corresponding media type is chosen from the list of character sets returned in the response Content-type HTTP header.

  Gets or sets the media type of the request.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String

  A containing an HTTP method. The default value is "GET".

  , , or an invalid value was specified for a set operation.

  The property can be set to any of the HTTP 1.1 protocol verbs: GET, HEAD, POST, PUT, DELETE, TRACE, or OPTIONS.

  If the property is set to any value other than -1, the property must be set to a protocol property that uploads data.

  Gets or sets the method for the request.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean

  if the current request can be pipelined; otherwise, . The default is .

  An application uses the property to indicate a preference for pipelined connections. When is true, an application makes pipelined connections to the servers that support them.

  Pipelined connections are made only when the property is also true.

  Gets or sets a value that indicates whether to pipeline the request to the Internet resource.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean

  to send a HTTP WWW-authenticate header with the current instance without waiting for an authentication challenge from the requested resource; otherwise, . The default is .

  After a client request to a specific is successfully authenticated, if is true and credentials are supplied, the Authorization header is sent with each request to any that matches the specific up to the last forward slash. So if the client request successfully authenticated to a specific that contains the following:

  http://www.contoso.com/firstpath/

  Then the Authorization header for preauthentication is sent with each request to any of the following instances:

  http://www.contoso.com/firstpath/

  http://www.contoso.com/firstpath/default

  http://www.contoso.com/firstpath/default.html

  http://www.contoso.com/firstpath/sample.html

  However, the Authorization header is not sent with requests to any of the following instances:

  http://www.contoso.com/

  http://www.contoso.com/firstpath

  http://www.contoso.com/secondpath/

  If the client request to a specific is not successfully authenticated, the request uses standard authentication procedures.

  With the exception of the first request, the property indicates whether to send authentication information with subsequent requests to a that matches the specific up to the last forward slash without waiting to be challenged by the server.

  The following dialog between client and server illustrates the effect of this property. The dialog assumes that basic authentication is in use.

  is false:

  Client: GET someUrl

  Server: 401 WWW-Authenticate Basic

  Client: GET with Authorization headers

  Server: 200 OK

  Client: GET someUrl

  Server: 401 WWW-Authenticate Basic

  Client: GET with Authorization headers

  Server: 200 OK

  is true:

  Client: GET someUrl

  Server: 401 WWW-Authenticate Basic

  Client: GET with Authorization headers

  Server: 200 OK

  Client: GET someUrl with Authorization headers

  If the authentication scheme does not support preauthentication, the value of this property is ignored.

  Gets or sets a value that indicates whether to send an Authorization header with the request.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Version

  A that represents the HTTP version to use for the request. The default is .

  The HTTP version is set to a value other than 1.0 or 1.1.

  The class supports only versions 1.0 and 1.1 of HTTP. Setting to a different version throws an exception.

  To set the HTTP version of the current request, use the and fields of the class.

  Gets or sets the version of HTTP to use for the request.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Net.IWebProxy

  The instance to use as a proxy for the current instance. The default value is set by calling .

  A set operation was requested and the specified value was . A set operation was requested but data has already been sent to the request stream. The caller does not have permission for the requested operation. Requires unrestricted . See .

  The property identifies the object to use to process requests to Internet resources. To specify that no proxy should be used, set the property to the proxy instance returned by the method.

  The local computer or application config file may specify that a default proxy be used. If the property is specified, then the proxy settings from the property override the local computer or application config file and the instance will use the proxy settings specified. If no proxy is specified in a config file and the property is unspecified, the class uses the proxy settings inherited from Internet Explorer on the local computer. If there are no proxy settings in Internet Explorer, the request is sent directly to the server.

  The class parses a proxy bypass list with wildcard characters inherited from Internet Explorer the same as the bypass list is parsed directly by Internet Explorer. For example, the class will parse a bypass list of "nt*" from Internet Explorer as a regular expression of "nt.*". So a URL of "http://nt.com" would bypass the proxy using the class and using Internet Explorer.

  The class supports local proxy bypass. The class considers a destination to be local if any of the following conditions are met:

  The destination contains a flat name (no dots in the URL).

  The destination contains a loopback address ( or ) or the destination contains an assigned to the local computer.

  The domain suffix of the destination matches the local computer's domain suffix ().

  Changing the property after the request has been started by calling the , , , or method throws an . For information on the proxy element see DefaultProxy Element (Network Settings).

  Gets or sets proxy information for the request.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 To be added.

  The property is used when writing to the stream returned by the method or reading from the stream returned by the method.

  Specifically, the property controls the time-out for the method, which is used to read the stream returned by the method, and for the method, which is used to write to the stream returned by the method.

  To specify the amount of time to wait for the request to complete, use the property.

  Gets or sets a time-out in milliseconds when writing to or reading from a stream.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String

  A containing the value of the HTTP Referer header. The default value is .

  If the property is true, the property is set automatically when the request is redirected to another site.

  To clear the Referer HTTP header, set the property to null.

  The value for this property is stored in . If WebHeaderCollection is set, the property value is lost.

  Gets or sets the value of the Referer HTTP header.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Uri

  The of the resource that receives requests sent by the current instance.

  The object passed to by the call to .

  Following a redirection header does not change the property. To get the actual URI that responded to the request, examine the property.

  Gets the original Uniform Resource Identifier (URI) of the request.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean

  to send data in segments; otherwise, . The default value is .

  A set operation was requested but data has already been written to the request data stream.

  When is true, the request sends data to the Internet resource in segments. The Internet resource must support receiving chunked data.

  Changing the property after the request has been started by calling the , , , or method throws an .

  Gets or sets a value that indicates whether to send data in segments to the Internet resource.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Net.ServicePoint

  A that represents the network connection to the destination. The value of this property can be, but is not required to be, until the method is called.

  The property may be different from if the request is redirected.

  Gets the service point to use for the request.

  0
- Property
  4.0.0.0
  System.MonoTODO("for portable library support")
  System.Boolean To be added. To be added.

  Gets a value that indicates whether the request provides support for a .

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  Any objects included in the are automatically tracked and serialized by the formatter.

  Populates a with the data needed to serialize the target object.

  The to populate with data. A that specifies the destination for this serialization.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32

  A indicating the number of milliseconds to wait for a response until the request times out, or to indicate that the request does not time out.

  A value less than zero and not equal to is specified for a set operation.

  is the number of milliseconds that a subsequent synchronous request made with the method waits for a response, and the method waits for a stream. The applies to the entire request and response, not individually to the and method calls. If the resource is not returned within the time-out period, the request throws a with the property set to .

  The property must be set before the or method is called. Changing the property after calling the or method has no effect

  The property has no effect on asynchronous requests made with the or method.

  In the case of asynchronous requests, the client application implements its own time-out mechanism. Refer to the example in the method.

  To specify the amount of time to wait before a read or write operation times out, use the property.

  A Domain Name System (DNS) query may take up to 15 seconds to return or time out. If your request contains a host name that requires resolution and you set to a value less than 15 seconds, it may take 15 seconds or more before a is thrown to indicate a timeout on your request.

  Gets or sets the time-out value in milliseconds for the and methods.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String

  A that contains the value of the HTTP Transfer-encoding header. The default value is .

  is set when is . is set to the value "Chunked". This value is case insensitive.

  Before you can set the property, you must first set the property to true. Clearing by setting it to null has no effect on the value of .

  Values assigned to the property replace any existing contents.

  The value for this property is stored in . If WebHeaderCollection is set, the property value is lost.

  Gets or sets the value of the Transfer-encoding HTTP header.

  0
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  The default value for this property is false, which causes the current connection to be closed after a request is completed. Your application must go through the authentication sequence every time it issues a new request.

  If this property is set to true, the connection used to retrieve the response remains open after the authentication has been performed. In this case, other requests that have this property set to true may use the connection without re-authenticating. In other words, if a connection has been authenticated for user A, user B may reuse A's connection; user B's request is fulfilled based on the credentials of user A.

  Because it is possible for an application to use the connection without being authenticated, you need to be sure that there is no administrative vulnerability in your system when setting this property to true. If your application sends requests for multiple users (impersonates multiple user accounts) and relies on authentication to protect resources, do not set this property to true unless you use connection groups as described below.

  You may want to consider enabling this mechanism if your are having performance problems and your application is running on a Web server with integrated Windows authentication.

  Enabling this setting opens the system to security risks. If you set the property to true be sure to take the following precautions:

  Use the property to manage connections for different users. This avoids the potential use of the connection by non-authenticated applications. For example, user A should have a unique connection group name that is different from user B. This provides a layer of isolation for each user account.

  Run your application in a protected environment to help avoid possible connection exploits.

  If you control the back-end server, as an alternative you might consider turning off authentication persistence. This increases performance to a lesser degree, but it is safer. For more details, search for AuthPersistence in the MSDN library at http://msdn.microsoft.com/library.

  If both and are set to true, each request is sent using a connection from the unsafe pool, but with an Authorization header.

  Gets or sets a value that indicates whether to allow high-speed NTLM-authenticated connection sharing.

- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  Set this property to true when requests made by this object should, if requested by the server, be authenticated using the credentials of the currently logged on user. For client applications, this is the desired behavior in most scenarios. For middle-tier applications, such as ASP.NET applications, instead of using this property, you would typically set the property to the credentials of the client on whose behalf the request is made.

  Gets or sets a value that controls whether default credentials are sent with requests.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String

  A containing the value of the HTTP User-agent header. The default value is .

  For additional information see section 14.43 of IETF RFC 2616 - HTTP/1.1.

  Gets or sets the value of the User-agent HTTP header.

  0
0