Windows.Web.Http.Headers

September 2, 2020 ยท View on GitHub

-description

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

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

-examples

-see-also

HttpClient, HttpRequestMessage, HttpResponseMessage, Windows.Web.Http, Windows.Web.Http.Filters, HttpClient sample (Windows 10)