<PackageReference Include="Azure.Core" Version="1.53.0" />

Azure.Core.RequestUriBuilder

public class RequestUriBuilder
Provides a custom builder for Uniform Resource Identifiers (URIs) and modifies URIs for the Uri class.
protected bool HasPath { get; }

Gets whether or not this instance of RequestUriBuilder has a path.

protected bool HasQuery { get; }

Gets whether or not this instance of RequestUriBuilder has a query.

public string Host { get; set; }

Gets or sets the Domain Name System (DNS) host name or IP address of a server.

public string Path { get; set; }

Gets or sets the path to the resource referenced by the URI.

public string PathAndQuery { get; }

Gets the path and query string to the resource referenced by the URI.

public int Port { get; set; }

Gets or sets the port number of the URI.

public string Query { get; set; }

Gets or sets any query information included in the URI.

public string Scheme { get; set; }

Gets or sets the scheme name of the URI.

public void AppendPath(string value)

Escapes and appends the value to Path without adding path separator. Path segments and any other characters will be escaped, e.g. ":" will be escaped as "%3a".

public void AppendPath(string value, bool escape)

Optionally escapes and appends the value to Path without adding path separator. If escape is true, path segments and any other characters will be escaped, e.g. ":" will be escaped as "%3a".

public void AppendPath(ReadOnlySpan<char> value, bool escape)

Optionally escapes and appends the value to Path without adding path separator. If escape is true, path segments and any other characters will be escaped, e.g. ":" will be escaped as "%3a".

public void AppendQuery(string name, string value)

Appends a query parameter adding separator if required. Escapes the value.

public void AppendQuery(string name, string value, bool escapeValue)

Appends a query parameter adding separator if required.

public void AppendQuery(ReadOnlySpan<char> name, ReadOnlySpan<char> value, bool escapeValue)

Appends a query parameter adding separator if required.

public void Reset(Uri value)

Replaces values inside this instance with values provided in the value parameter.

public Uri ToUri()

Gets the Uri instance constructed by the specified RequestUriBuilder instance.