HttpRequestHeader Enumeration

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

The HTTP headers that may be specified in a client request.

Namespace: System.Net
Assembly: System.Net (in System.Net.dll)

Syntax

Public Enumeration HttpRequestHeader
public enum HttpRequestHeader

Members

Member name Description
CacheControl The Cache-Control header, which specifies directives that must be obeyed by all cache control mechanisms along the request/response chain.
Connection The Connection header, which specifies options that are desired for a particular connection.
Date The Date header, which specifies the date and time at which the request originated.
KeepAlive The Keep-Alive header, which specifies a parameter used into order to maintain a persistent connection.
Pragma The Pragma header, which specifies implementation-specific directives that might apply to any agent along the request/response chain.
Trailer The Trailer header, which specifies the header fields present in the trailer of a message encoded with chunked transfer-coding.
TransferEncoding The Transfer-Encoding header, which specifies what (if any) type of transformation that has been applied to the message body.
Upgrade The Upgrade header, which specifies additional communications protocols that the client supports.
Via The Via header, which specifies intermediate protocols to be used by gateway and proxy agents.
Warning The Warning header, which specifies additional information about that status or transformation of a message that might not be reflected in the message.
Allow The Allow header, which specifies the set of HTTP methods supported.
ContentLength The Content-Length header, which specifies the length, in bytes, of the accompanying body data.
ContentType The Content-Type header, which specifies the MIME type of the accompanying body data.
ContentEncoding The Content-Encoding header, which specifies the encodings that have been applied to the accompanying body data.
ContentLanguage The Content-Langauge header, which specifies the natural language(s) of the accompanying body data.
ContentLocation The Content-Location header, which specifies a URI from which the accompanying body may be obtained.
ContentMd5 The Content-MD5 header, which specifies the MD5 digest of the accompanying body data, for the purpose of providing an end-to-end message integrity check.
ContentRange The Content-Range header, which specifies where in the full body the accompanying partial body data should be applied.
Expires The Expires header, which specifies the date and time after which the accompanying body data should be considered stale.
LastModified The Last-Modified header, which specifies the date and time at which the accompanying body data was last modified.
Accept The Accept header, which specifies the MIME types that are acceptable for the response.
AcceptCharset The Accept-Charset header, which specifies the character sets that are acceptable for the response.
AcceptEncoding The Accept-Encoding header, which specifies the content encodings that are acceptable for the response.
AcceptLanguage The Accept-Langauge header, which specifies that natural languages that are preferred for the response.
Authorization The Authorization header, which specifies the credentials that the client presents in order to authenticate itself to the server.
Cookie The Cookie header, which specifies cookie data presented to the server.
Expect The Expect header, which specifies particular server behaviors that are required by the client.
From The From header, which specifies an Internet E-mail address for the human user who controls the requesting user agent.
Host The Host header, which specifies the host name and port number of the resource being requested.
IfMatch The If-Match header, which specifies that the requested operation should be performed only if the client's cached copy of the indicated resource is current.
IfModifiedSince The If-Modified-Since header, which specifies that the requested operation should be performed only if the requested resource has been modified since the indicated data and time.
IfNoneMatch The If-None-Match header, which specifies that the requested operation should be performed only if none of client's cached copies of the indicated resources are current.
IfRange The If-Range header, which specifies that only the specified range of the requested resource should be sent, if the client's cached copy is current.
IfUnmodifiedSince The If-Unmodified-Since header, which specifies that the requested operation should be performed only if the requested resource has not been modified since the indicated date and time.
MaxForwards The Max-Forwards header, which specifies an integer indicating the remaining number of times that this request may be forwarded.
ProxyAuthorization The Proxy-Authorization header, which specifies the credentials that the client presents in order to authenticate itself to a proxy.
Referer The Referer header, which specifies the URI of the resource from which the request URI was obtained.
Range The Range header, which specifies the the sub-range(s) of the response that the client requests be returned in lieu of the entire response.
Te The TE header, which specifies the transfer encodings that are acceptable for the response.
Translate The Translate header, a Microsoft extension to the HTTP specification used in conjunction with WebDAV functionality.
UserAgent The User-Agent header, which specifies information about the client agent.

Remarks

The appropriate contents of various headers are described in detail in the HTTP 1.1 specification, available at http://www.w3.org/Protocols/rfc2616/rfc2616.html.

Information on restricted headers are discussed in detail in the documentation for the WebHeaderCollection class

Capabilities

If you use this API in your app, you must specify the following capabilities in the app manifest. Otherwise, your app might not work correctly or it might exit unexpectedly.

ID_CAP_NETWORKING

Windows Phone 8, Windows Phone OS 7.1

For more info, see App capabilities and hardware requirements for Windows Phone 8.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Platforms

Windows Phone

See Also

Reference

System.Net Namespace

WebHeaderCollection