Поделиться через


HttpClient.DefaultRequestHeaders Property

Gets the headers which should be sent with each request.

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

Syntax

'Declaration
Public ReadOnly Property DefaultRequestHeaders As HttpRequestHeaders 
    Get
'Usage
Dim instance As HttpClient 
Dim value As HttpRequestHeaders 

value = instance.DefaultRequestHeaders
public HttpRequestHeaders DefaultRequestHeaders { get; }
public:
property HttpRequestHeaders^ DefaultRequestHeaders {
    HttpRequestHeaders^ get ();
}
member DefaultRequestHeaders : HttpRequestHeaders
function get DefaultRequestHeaders () : HttpRequestHeaders

Property Value

Type: System.Net.Http.Headers.HttpRequestHeaders

Remarks

For a complete example of using the HttpClient class, see Calling a Web API From a .NET Client

See Also

Reference

HttpClient Class

System.Net.Http Namespace