Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
HttpClient.BaseAddress Property
Definition
- Namespace:
- System.Net.Http
- Assembly:
- System.Net.Http.dll
- Assemblies:
- netstandard.dll, System.Net.Http.dll
- Assembly:
- netstandard.dll
- Source:
- HttpClient.cs
- Source:
- HttpClient.cs
- Source:
- HttpClient.cs
- Source:
- HttpClient.cs
- Source:
- HttpClient.cs
Important
Some information relates to prerelease product that may be substantially modified before itβs released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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; }
public Uri? BaseAddress { get; set; }
member this.BaseAddress : Uri with get, set
Public Property BaseAddress As Uri
Property Value
The base address of Uniform Resource Identifier (URI) of the Internet resource used when sending requests.
Exceptions
The Uri specified is not an absolute URI.
The HttpClient instance has already started one or more requests.
The HttpClient instance has already been disposed.
Remarks
When sending a HttpRequestMessage with a relative URI, the message URI is added to the BaseAddress property to create an absolute URI.
Note that all characters after the right-most "/" in the base URI are excluded when combined with the message URI. See RFC 3986 Uniform Resource Identifier Generic Syntax specification.
Applies to
Feedback
Was this page helpful?
