System.Net.Requests
The HTTP headers that may be specified in a client request.
The Accept header, which specifies the MIME types that are acceptable for the response.
The Accept-Charset header, which specifies the character sets that are acceptable for the response.
The Accept-Encoding header, which specifies the content encodings that are acceptable for the response.
The Accept-Langauge header, which specifies that natural languages that are preferred for the response.
The Allow header, which specifies the set of HTTP methods supported.
The Authorization header, which specifies the credentials that the client presents in order to authenticate itself to the server.
The Cache-Control header, which specifies directives that must be obeyed by all cache control mechanisms along the request/response chain.
The Connection header, which specifies options that are desired for a particular connection.
The Content-Encoding header, which specifies the encodings that have been applied to the accompanying body data.
The Content-Langauge header, which specifies the natural language(s) of the accompanying body data.
The Content-Length header, which specifies the length, in bytes, of the accompanying body data.
The Content-Location header, which specifies a URI from which the accompanying body may be obtained.
The Content-MD5 header, which specifies the MD5 digest of the accompanying body data, for the purpose of providing an end-to-end message integrity check.
The Content-Range header, which specifies where in the full body the accompanying partial body data should be applied.
The Content-Type header, which specifies the MIME type of the accompanying body data.
The Cookie header, which specifies cookie data presented to the server.
The Date header, which specifies the date and time at which the request originated.
The Expect header, which specifies particular server behaviors that are required by the client.
The Expires header, which specifies the date and time after which the accompanying body data should be considered stale.
The From header, which specifies an Internet E-mail address for the human user who controls the requesting user agent.
The Host header, which specifies the host name and port number of the resource being requested.
The If-Match header, which specifies that the requested operation should be performed only if the client's cached copy of the indicated resource is current.
The If-Modified-Since header, which specifies that the requested operation should be performed only if the requested resource has been modified since the indicated data and time.
The If-None-Match header, which specifies that the requested operation should be performed only if none of client's cached copies of the indicated resources are current.
The If-Range header, which specifies that only the specified range of the requested resource should be sent, if the client's cached copy is current.
The If-Unmodified-Since header, which specifies that the requested operation should be performed only if the requested resource has not been modified since the indicated date and time.
The Keep-Alive header, which specifies a parameter used into order to maintain a persistent connection.
The Last-Modified header, which specifies the date and time at which the accompanying body data was last modified.
The Max-Forwards header, which specifies an integer indicating the remaining number of times that this request may be forwarded.
The Pragma header, which specifies implementation-specific directives that might apply to any agent along the request/response chain.
The Proxy-Authorization header, which specifies the credentials that the client presents in order to authenticate itself to a proxy.
The Range header, which specifies the the sub-range(s) of the response that the client requests be returned in lieu of the entire response.
The Referer header, which specifies the URI of the resource from which the request URI was obtained.
The TE header, which specifies the transfer encodings that are acceptable for the response.
The Trailer header, which specifies the header fields present in the trailer of a message encoded with chunked transfer-coding.
The Transfer-Encoding header, which specifies what (if any) type of transformation that has been applied to the message body.
The Translate header, a Microsoft extension to the HTTP specification used in conjunction with WebDAV functionality.
The Upgrade header, which specifies additional communications protocols that the client supports.
The User-Agent header, which specifies information about the client agent.
The Via header, which specifies intermediate protocols to be used by gateway and proxy agents.
The Warning header, which specifies additional information about that status or transformation of a message that might not be reflected in the message.
Provides an HTTP-specific implementation of the class.
Cancels a request to an Internet resource.
Gets or sets the value of the Accept HTTP header.
The value of the Accept HTTP header. The default value is null.
Gets or sets a value that indicates whether to buffer the received from the Internet resource.
Returns .true to enable buffering of the data received from the Internet resource; false to disable buffering. The default is true.
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.
The property is GET or HEAD.-or- is true, is false, is -1, is false, and is POST or PUT.
The stream is being used by a previous call to -or- is set to a value and is false.-or- The thread pool is running out of threads.
The request cache validator indicated that the response for this request can be served from the cache; however, requests that write data must not use the cache. This exception can occur if you are using a custom cache validator that is incorrectly implemented.
was previously called.
In a .NET Compact Framework application, a request stream with zero content length was not obtained and closed correctly. For more information about handling zero content length requests, see Network Programming in the .NET Compact Framework.
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.
The stream is already in use by a previous call to -or- is set to a value and is false.-or- The thread pool is running out of threads.
is GET or HEAD, and either is greater than zero or is true.-or- is true, is false, and either is -1, is false and is POST or PUT.-or- The has an entity body but the method is called without calling the method. -or- The is greater than zero, but the application does not write all of the promised data.
was previously called.
Gets or sets the value of the Content-type HTTP header.
The value of the Content-type HTTP header. The default value is null.
Gets or sets a timeout, in milliseconds, to wait until the 100-Continue is received from the server.
Returns .The timeout, in milliseconds, to wait until the 100-Continue is received.
Gets or sets the cookies associated with the request.
A that contains the cookies associated with this request.
Gets or sets authentication information for the request.
An that contains the authentication credentials associated with the request. The default is null.
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.
is null.
The request did not complete, and no stream is available.
was not returned by the current instance from a call to .
This method was called previously using .
was previously called.-or- An error occurred while processing the request.
Ends an asynchronous request to an Internet resource.
A that contains the response from the Internet resource.
The pending request for a response.
is null.
This method was called previously using -or- The property 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.
was not returned by the current instance from a call to .
Gets a value that indicates whether a response has been received from an Internet resource.
true if a response has been received; otherwise, false.
Specifies a collection of the name/value pairs that make up the HTTP headers.
A that contains the name/value pairs that make up the headers for the HTTP request.
The request has been started by calling the , , , or method.
Gets or sets the method for the request.
The request method to use to contact the Internet resource. The default value is GET.
No method is supplied.-or- The method string contains invalid characters.
Gets the original Uniform Resource Identifier (URI) of the request.
A that contains the URI of the Internet resource passed to the method.
Gets a value that indicates whether the request provides support for a .
Returns .true if a is supported; otherwise, false.
Gets or sets a value that controls whether default credentials are sent with requests.
true if the default credentials are used; otherwise false. The default value is false.
You attempted to set this property after the request was sent.
Provides an HTTP-specific implementation of the class.
Gets the length of the content returned by the request.
The number of bytes returned by the request. Content length does not include header information.
The current instance has been disposed.
Gets the content type of the response.
A string that contains the content type of the response.
The current instance has been disposed.
Gets or sets the cookies that are associated with this response.
A that contains the cookies that are associated with this response.
The current instance has been disposed.
Releases the unmanaged resources used by the , and optionally disposes of the managed resources.
true to release both managed and unmanaged resources; false to releases only unmanaged resources.
Gets the stream that is used to read the body of the response from the server.
A containing the body of the response.
There is no response stream.
The current instance has been disposed.
Gets the headers that are associated with this response from the server.
A that contains the header information returned with the response.
The current instance has been disposed.
Gets the method that is used to return the response.
A string that contains the HTTP method that is used to return the response.
The current instance has been disposed.
Gets the URI of the Internet resource that responded to the request.
A that contains the URI of the Internet resource that responded to the request.
The current instance has been disposed.
Gets the status of the response.
One of the values.
The current instance has been disposed.
Gets the status description returned with the response.
A string that describes the status of the response.
The current instance has been disposed.
Gets a value that indicates if headers are supported.
Returns .true if headers are supported; otherwise, false.
Provides the base interface for creating instances.
Creates a instance.
A instance.
The uniform resource identifier (URI) of the Web resource.
The request scheme specified in is not supported by this instance.
is null.
NoteIn the .NET for Windows Store apps or the Portable Class Library, catch the base class exception, , instead.The URI specified in is not a valid URI.
The exception that is thrown when an error is made while using a network protocol.
Initializes a new instance of the class.
Initializes a new instance of the class with the specified message.
The error message string.
The exception that is thrown when an error occurs while accessing the network through a pluggable protocol.
Initializes a new instance of the class.
Initializes a new instance of the class with the specified error message.
The text of the error message.
Initializes a new instance of the class with the specified error message and nested exception.
The text of the error message.
A nested exception.
Initializes a new instance of the class with the specified error message, nested exception, status, and response.
The text of the error message.
A nested exception.
One of the values.
A instance that contains the response from the remote host.
Initializes a new instance of the class with the specified error message and status.
The text of the error message.
One of the values.
Gets the response that the remote host returned.
If a response is available from the Internet resource, a instance that contains the error response from an Internet resource; otherwise, null.
Gets the status of the response.
One of the values.
Defines status codes for the class.
The remote service point could not be contacted at the transport level.
A message was received that exceeded the specified limit when sending a request or receiving a response from the server.
An internal asynchronous request is pending.
The request was canceled, the method was called, or an unclassifiable error occurred. This is the default value for .
A complete request could not be sent to the remote server.
No error was encountered.
An exception of unknown type has occurred.
Contains protocol headers associated with a request or response.
Initializes a new instance of the class.
Gets all header names (keys) in the collection.
An array of type containing all header names in a Web request.
Gets the number of headers in the collection.
An indicating the number of headers in a request.
Gets or sets the specified request header.
A instance containing the specified header value.
The request header value.
This instance does not allow instances of .
Returns an enumerator that can iterate through the instance.
Returns .An enumerator that can iterate through the instance.
This method is obsolete.
The representation of the collection.
Makes a request to a Uniform Resource Identifier (URI). This is an abstract class.
Initializes a new instance of the class.
Aborts the Request
Any attempt is made to access the method, when the method is not overridden in a descendant class.
When overridden in a descendant class, provides an asynchronous version of the method.
An that references the asynchronous request.
The delegate.
An object containing state information for this asynchronous request.
Any attempt is made to access the method, when the method is not overridden in a descendant class.
When overridden in a descendant class, begins an asynchronous request for an Internet resource.
An that references the asynchronous request.
The delegate.
An object containing state information for this asynchronous request.
Any attempt is made to access the method, when the method is not overridden in a descendant class.
When overridden in a descendant class, gets or sets the content type of the request data being sent.
The content type of the request data.
Any attempt is made to get or set the property, when the property is not overridden in a descendant class.
Initializes a new instance for the specified URI scheme.
A descendant for the specific URI scheme.
The URI that identifies the Internet resource.
The request scheme specified in has not been registered.
is null.
The caller does not have permission to connect to the requested URI or a URI that the request is redirected to.
NoteIn the .NET for Windows Store apps or the Portable Class Library, catch the base class exception, , instead.The URI specified in is not a valid URI.
Initializes a new instance for the specified URI scheme.
A descendant for the specified URI scheme.
A containing the URI of the requested resource.
The request scheme specified in is not registered.
is null.
The caller does not have permission to connect to the requested URI or a URI that the request is redirected to.
Initializes a new instance for the specified URI string.
Returns .An instance for the specific URI string.
A URI string that identifies the Internet resource.
The request scheme specified in is the http or https scheme.
is null.
The caller does not have permission to connect to the requested URI or a URI that the request is redirected to.
The URI specified in is not a valid URI.
Initializes a new instance for the specified URI.
Returns .An instance for the specific URI string.
A URI that identifies the Internet resource.
The request scheme specified in is the http or https scheme.
is null.
The caller does not have permission to connect to the requested URI or a URI that the request is redirected to.
The URI specified in is not a valid URI.
When overridden in a descendant class, gets or sets the network credentials used for authenticating the request with the Internet resource.
An containing the authentication credentials associated with the request. The default is null.
Any attempt is made to get or set the property, when the property is not overridden in a descendant class.
Gets or sets the global HTTP proxy.
An used by every call to instances of .
When overridden in a descendant class, returns a for writing data to the Internet resource.
A to write data to.
An that references a pending request for a stream.
Any attempt is made to access the method, when the method is not overridden in a descendant class.
When overridden in a descendant class, returns a .
A that contains a response to the Internet request.
An that references a pending request for a response.
Any attempt is made to access the method, when the method is not overridden in a descendant class.
When overridden in a descendant class, returns a for writing data to the Internet resource as an asynchronous operation.
Returns .The task object representing the asynchronous operation.
When overridden in a descendant class, returns a response to an Internet request as an asynchronous operation.
Returns .The task object representing the asynchronous operation.
When overridden in a descendant class, gets or sets the collection of header name/value pairs associated with the request.
A containing the header name/value pairs associated with this request.
Any attempt is made to get or set the property, when the property is not overridden in a descendant class.
When overridden in a descendant class, gets or sets the protocol method to use in this request.
The protocol method to use in this request.
If the property is not overridden in a descendant class, any attempt is made to get or set the property.
When overridden in a descendant class, gets or sets the network proxy to use to access this Internet resource.
The to use to access the Internet resource.
Any attempt is made to get or set the property, when the property is not overridden in a descendant class.
Registers a descendant for the specified URI.
true if registration is successful; otherwise, false.
The complete URI or URI prefix that the descendant services.
The create method that the calls to create the descendant.
is null-or- is null.
When overridden in a descendant class, gets the URI of the Internet resource associated with the request.
A representing the resource associated with the request
Any attempt is made to get or set the property, when the property is not overridden in a descendant class.
When overridden in a descendant class, gets or sets a value that controls whether are sent with requests.
true if the default credentials are used; otherwise false. The default value is false.
You attempted to set this property after the request was sent.
Any attempt is made to access the property, when the property is not overridden in a descendant class.
Provides a response from a Uniform Resource Identifier (URI). This is an abstract class.
Initializes a new instance of the class.
When overridden in a descendant class, gets or sets the content length of data being received.
The number of bytes returned from the Internet resource.
Any attempt is made to get or set the property, when the property is not overridden in a descendant class.
When overridden in a derived class, gets or sets the content type of the data being received.
A string that contains the content type of the response.
Any attempt is made to get or set the property, when the property is not overridden in a descendant class.
Releases the unmanaged resources used by the object.
Releases the unmanaged resources used by the object, and optionally disposes of the managed resources.
true to release both managed and unmanaged resources; false to releases only unmanaged resources.
When overridden in a descendant class, returns the data stream from the Internet resource.
An instance of the class for reading data from the Internet resource.
Any attempt is made to access the method, when the method is not overridden in a descendant class.
When overridden in a derived class, gets a collection of header name-value pairs associated with this request.
An instance of the class that contains header values associated with this response.
Any attempt is made to get or set the property, when the property is not overridden in a descendant class.
When overridden in a derived class, gets the URI of the Internet resource that actually responded to the request.
An instance of the class that contains the URI of the Internet resource that actually responded to the request.
Any attempt is made to get or set the property, when the property is not overridden in a descendant class.
Gets a value that indicates if headers are supported.
Returns .true if headers are supported; otherwise, false.