System.Net.Http Namespace ()

Switch View :
ScriptFree
.NET Framework Class Library
System.Net.Http Namespace

[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:

  1. HTTP client components that allow users to consume modern web services over HTTP.

  2. 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:

  1. HttpClient - the primary class used to send and receive requests over HTTP.

  2. HttpRequestMessage and HttpResponseMessage - HTTP messages as defined in RFC 2616 by the IETF.

  3. HttpHeaders - HTTP headers as defined in RFC 2616 by the IETF.

  4. 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.

Classes

  Class Description
Public class ByteArrayContent Provides HTTP content based on a byte array.
Public class DelegatingHandler A base type for HTTP handlers that delegate the processing of HTTP response messages to another handler, called the inner handler.
Public class FormUrlEncodedContent A container for name/value tuples encoded using application/x-www-form-urlencoded MIME type.
Public class HttpClient Provides a base class for sending HTTP requests and receiving HTTP responses from a resource identified by a URI.
Public class HttpClientHandler A base class for HTTP handler implementations.
Public class HttpContent A base class representing an HTTP entity body and content headers.
Public class HttpMessageHandler A base type for HTTP message handlers.
Public class HttpMethod A helper class for retrieving and comparing standard HTTP methods.
Public class HttpRequestException A base class for exceptions thrown by the HttpClient and HttpMessageHandler classes.
Public class HttpRequestMessage Represents a HTTP request message.
Public class HttpResponseMessage Represents a HTTP response message.
Public class MessageProcessingHandler A base type for handlers which only do some small processing of request and/or response messages.
Public class MultipartContent Provides a collection of HttpContent objects that get serialized using the multipart/* content type specification.
Public class MultipartFormDataContent Provides a container for content encoded using multipart/form-data MIME type.
Public class StreamContent Provides HTTP content based on a stream.
Public class StringContent Provides HTTP content based on a string.
Public class WebRequestHandler Implements a transport handler using HttpWebRequest instances to send HTTP requests to servers.
Enumerations

  Enumeration Description
Public enumeration 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.
See Also

Reference