Windows.Web.Http.Headers
Windows.Web.Http.Headers
Windows.Web.Http.Headers
Windows.Web.Http.Headers
Namespace
Provides support for HTTP headers used by the Windows.Web.Http namespace for Windows Store app that target HTTP services.
Classes
Remarks
The Windows.Web.Http namespace and the related Windows.Web.Http.Headers and Windows.Web.Http.Filters namespaces provide a programming interface for Windows Store app that connect to HTTP and REST services. These namespaces provides consistent support in JavaScript, C#, VB.NET, and C++ for HTTP app developers.
Classes in the Windows.Web.Http.Headers namespace represent HTTP headers defined in RFC 2616 by the IETF. HTTP headers are associated with the HttpRequestMessage, HttpResponseMessage, and HTTP content sent with an HTTP request message or received with an HTTP response message.
The primary classes in the Windows.Web.Http.Headers namespace are the following:
- HttpRequestHeaderCollection - a collection of the HTTP headers associated with an HTTP request.
- HttpResponseHeaderCollection - a collection of the HTTP headers associated with an HTTP response.
- HttpContentHeaderCollection - a collection of the HTTP headers associated with the content, which can be used on an HTTP request or response.
Most of the properties on these primary classes provide access to strongly-typed class objects for specific HTTP headers.
The Headers property on HttpRequestMessage returns an HttpRequestHeaderCollection object. The DefaultRequestHeaders property on HttpClient also returns an HttpRequestHeaderCollection object.
The Headers property on HttpResponseMessage returns an HttpResponseHeaderCollection object.
The HttpContentHeaderCollection has a constructor and also is returned by the property on HttpBufferContent, HttpFormUrlEncodedContent, HttpMultipartContent, HttpMultipartFormDataContent, HttpStringContent, and HttpStreamContent classes and the IHttpContent interface.