Delen via


HttpRequestMessage.Headers Property

Definition

Gets the collection of the HTTP request headers associated with the HttpRequestMessage.

public:
 property HttpRequestHeaderCollection ^ Headers { HttpRequestHeaderCollection ^ get(); };
HttpRequestHeaderCollection Headers();
public HttpRequestHeaderCollection Headers { get; }
var httpRequestHeaderCollection = httpRequestMessage.headers;
Public ReadOnly Property Headers As HttpRequestHeaderCollection

Property Value

The collection of HTTP request headers associated with the HttpRequestMessage.

Remarks

The Headers property returns an HttpRequestHeaderCollection object that can be used to get or set the specific headers on the HTTP request.

The Headers property represents the headers that an app developer can set, not all of the headers that may eventually be sent with the request. The HttpBaseProtocolFilter will add some additional headers.

Applies to

See also