HttpClient.DefaultRequestHeaders Property

.NET Framework (current version)
 

Gets the headers which should be sent with each request.

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

Public ReadOnly Property DefaultRequestHeaders As HttpRequestHeaders

Property Value

Type: System.Net.Http.Headers.HttpRequestHeaders

The headers which should be sent with each request.

Headers set on this property don't need to be set on request messages again.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.5
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1
Return to top
Show: