[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
The System.Net.Http namespace provides a programming interface for modern HTTP applications.
The System.Net.Http namespace is designed to provide the following:
-
HTTP client components that allow users to consume modern web services over HTTP.
-
HTTP components that can be used by both clients and servers (HTTP headers and messages, for example). This provides a consistent programming model on both the client and the server side for modern web services over HTTP.
The System.Net.Http namespace and the related System.Net.Http.Headers namespace provide the following set of components:
-
HttpClient - the primary class used to send and receive requests over HTTP.
-
HttpRequestMessage and HttpResponseMessage - HTTP messages as defined in RFC 2616 by the IETF.
-
HttpHeaders - HTTP headers as defined in RFC 2616 by the IETF.
-
HttpClientHandler - HTTP handlers responsible for producing HTTP response messages.
Classes in the System.Net.Http and System.Net.Http.Headers namespaces can be used to develop Metro style apps or desktop apps. When used in a Metro style app, classes in the System.Net.Http and System.Net.Http.Headers namespaces are affected by network isolation feature, part of the application security model used by the Windows Developer Preview. The appropriate network capabilities must be enabled in the app manifest for a Metro style app for the system to allow network access by a Metro style app. For more information, see the Network Isolation for Metro Style Apps.
| Class | Description | |
|---|---|---|
|
ByteArrayContent | Provides HTTP content based on a byte array. |
|
DelegatingHandler | A base type for HTTP handlers that delegate the processing of HTTP response messages to another handler, called the inner handler. |
|
FormUrlEncodedContent | A container for name/value tuples encoded using application/x-www-form-urlencoded MIME type. |
|
HttpClient | Provides a base class for sending HTTP requests and receiving HTTP responses from a resource identified by a URI. |
|
HttpClientHandler | A base class for HTTP handler implementations. |
|
HttpContent | A base class representing an HTTP entity body and content headers. |
|
HttpMessageHandler | A base type for HTTP message handlers. |
|
HttpMethod | A helper class for retrieving and comparing standard HTTP methods. |
|
HttpRequestException | A base class for exceptions thrown by the HttpClient and HttpMessageHandler classes. |
|
HttpRequestMessage | Represents a HTTP request message. |
|
HttpResponseMessage | Represents a HTTP response message. |
|
MessageProcessingHandler | A base type for handlers which only do some small processing of request and/or response messages. |
|
MultipartContent | Provides a collection of HttpContent objects that get serialized using the multipart/* content type specification. |
|
MultipartFormDataContent | Provides a container for content encoded using multipart/form-data MIME type. |
|
StreamContent | Provides HTTP content based on a stream. |
|
StringContent | Provides HTTP content based on a string. |
|
WebRequestHandler | Implements a transport handler using HttpWebRequest instances to send HTTP requests to servers. |
| Enumeration | Description | |
|---|---|---|
|
HttpCompletionOption | Indicates if HttpClient operations should be considered completed either as soon as a response is available, or after reading the entire response message including the content. |
