HttpRequestMessage.Headers HttpRequestMessage.Headers HttpRequestMessage.Headers HttpRequestMessage.Headers HttpRequestMessage.Headers Property

Definition

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

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

Property Value

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.

See also