HttpClient.BaseAddress HttpClient.BaseAddress HttpClient.BaseAddress HttpClient.BaseAddress Property

定义

获取或设置发送请求时使用的 Internet 资源的统一资源标识符 (URI) 的基址。Gets or sets the base address of Uniform Resource Identifier (URI) of the Internet resource used when sending requests.

public:
 property Uri ^ BaseAddress { Uri ^ get(); void set(Uri ^ value); };
public Uri BaseAddress { get; set; }
member this.BaseAddress : Uri with get, set
Public Property BaseAddress As Uri

属性值

发送请求时使用的 Internet 资源的统一资源标识符 (URI) 的基址。The base address of Uniform Resource Identifier (URI) of the Internet resource used when sending requests.

注解

发送时HttpRequestMessage的相对 Uri,对消息 Uri 将添加到BaseAddress属性来创建绝对 Uri。When sending a HttpRequestMessage with a relative Uri, the message Uri will be added to the BaseAddress property to create an absolute Uri.

适用于