Windows.Web.Http.Headers Namespace

Provides support for HTTP headers used by the Windows.Web.Http namespace for UWP app that target HTTP services.

Classes

HttpCacheDirectiveHeaderValueCollection

Represents the value of the Cache-Control HTTP header on HTTP content associated with an HTTP request or response.

HttpChallengeHeaderValue

Represents authentication information used in the Proxy-Authenticate and WWW-Authenticate HTTP header values.

HttpChallengeHeaderValueCollection

Represents the value of the Proxy-Authenticate or WWW-Authenticate HTTP header on an HTTP response.

HttpConnectionOptionHeaderValue

Represents connection information used in the Connection HTTP header on an HTTP request.

HttpConnectionOptionHeaderValueCollection

Represents the value of the Connection HTTP header on an HTTP request.

HttpContentCodingHeaderValue

Represents content encoding information used in the Content-Encoding HTTP header on HTTP content in a request or a response.

HttpContentCodingHeaderValueCollection

Represents the value of the Content-Encoding HTTP header on HTTP content in a request or a response.

HttpContentCodingWithQualityHeaderValue

Represents accept encoding information used in the Accept-Encoding HTTP header on an HTTP request.

HttpContentCodingWithQualityHeaderValueCollection

Represents the value of the Accept-Encoding HTTP header on an HTTP request.

HttpContentDispositionHeaderValue

Represents the value of the Content-Disposition HTTP header on HTTP content in a request or a response.

HttpContentHeaderCollection

Provides a collection of the HTTP headers associated with content on an HTTP request or response.

HttpContentRangeHeaderValue

Represents the value of the Content-Range HTTP header on HTTP content in a request or a response.

HttpCookiePairHeaderValue

Represents cookie information used in the Cookie HTTP header on an HTTP request.

HttpCookiePairHeaderValueCollection

Represents the value of the Cookie HTTP header on an HTTP request.

HttpCredentialsHeaderValue

Represents the value of the Authorization or Proxy-Authorization HTTP header on an HTTP request.

HttpDateOrDeltaHeaderValue

Represents the value of the Retry-After HTTP header on an HTTP response.

HttpExpectationHeaderValue

Represents a token for a particular server behavior required by the client that is used in the Expect HTTP header on an HTTP request.

HttpExpectationHeaderValueCollection

Represents the value of the Expect HTTP header on an HTTP request.

HttpLanguageHeaderValueCollection

Represents the value of the Content-Language HTTP header on HTTP content in a request or a response.

HttpLanguageRangeWithQualityHeaderValue

Represents accept language information used in the Accept-Language HTTP header on an HTTP request.

HttpLanguageRangeWithQualityHeaderValueCollection

Represents the value of the Accept-Language HTTP header on an HTTP request.

HttpMediaTypeHeaderValue

Represents the value of the Content-Type HTTP header on the HTTP content in a request or a response.

HttpMediaTypeWithQualityHeaderValue

Represents accept information used in the Accept HTTP header on an HTTP request.

HttpMediaTypeWithQualityHeaderValueCollection

Represents the value of the Accept HTTP header on an HTTP request.

HttpMethodHeaderValueCollection

Represents the value of the Allow HTTP header on an HTTP response.

HttpNameValueHeaderValue

Represents name and value information used in a number of HTTP headers.

HttpProductHeaderValue

Represents product information used by the HttpProductHeaderValue and HttpProductInfoHeaderValueCollection classes in the User-Agent HTTP header.

HttpProductInfoHeaderValue

Represents product information used in the User-Agent HTTP header on an HTTP request.

HttpProductInfoHeaderValueCollection

Represents the value of the User-Agent HTTP header on an HTTP request.

HttpRequestHeaderCollection

Provides a collection of the HTTP headers associated with an HTTP request.

HttpResponseHeaderCollection

Provides a collection of the HTTP headers associated with an HTTP response.

HttpTransferCodingHeaderValue

Represents transfer coding information used in the Transfer-Encoding HTTP header on an HTTP request.

HttpTransferCodingHeaderValueCollection

Represents the value of the Transfer-Encoding HTTP header on an HTTP request.

Remarks

The Windows.Web.Http namespace and the related Windows.Web.Http.Headers and Windows.Web.Http.Filters namespaces provide a programming interface for UWP 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:

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.

See also