HttpClient.DefaultRequestHeaders HttpClient.DefaultRequestHeaders HttpClient.DefaultRequestHeaders HttpClient.DefaultRequestHeaders Property

定义

获取与每个请求一起发送的标题。Gets the headers which should be sent with each request.

public:
 property System::Net::Http::Headers::HttpRequestHeaders ^ DefaultRequestHeaders { System::Net::Http::Headers::HttpRequestHeaders ^ get(); };
public System.Net.Http.Headers.HttpRequestHeaders DefaultRequestHeaders { get; }
member this.DefaultRequestHeaders : System.Net.Http.Headers.HttpRequestHeaders
Public ReadOnly Property DefaultRequestHeaders As 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.

适用于