Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Static class: RT.Servers.IHttpUrlExtensions

Summary

Provides extension functionality on the IHttpUrl type.

Static methods

string Returns the full domain name (the part that comes before the first slash) regardless of any URL resolvers in use. The protocol and the port number is not included.
string Returns the full path (the part that comes after the domain) regardless of any URL resolvers in use. The query string is not included.
string
ToFull(this IHttpUrl url)
Returns the full and complete URL as a single string.
string
ToHref(this IHttpUrl url)
Returns the full path and query string of the specified URL (the part that follows the domain). (see also remarks)
HttpUrl
ToUrl(this IHttpUrl url)
Creates an HttpUrl instance containing a copy of the specified URL.
IHttpUrl
Where(this IHttpUrl url, Func<string, bool> predicate)
Returns a new URL consisting of the specified URL but containing only those query parameters whose name matches the specified predicate.
IHttpUrl
Where(this IHttpUrl url, Func<string, string, bool> nameValuePredicate)
Returns a new URL consisting of the specified URL but containing only those query parameters whose name/value pair matches the specified predicate.
IHttpUrl
With(this IHttpUrl url, string pathOrSubdomain, bool useSubdomain = false, bool retainQueryParams = false)
Changes a URL’s subpath or subdomain.
IHttpUrl
WithDomain(this IHttpUrl url, string domain)
Returns a new URL with the IHttpUrl.Domain changed. The domain must be empty or end with a dot, unless it is at the TLD level, in which case it must be non-empty and not end with a dot.
IHttpUrlReturns a new, equivalent URL whose IHttpUrl.Domain is empty (treating it like the result of a nested URL resolver).
IHttpUrl Returns a new, equivalent URL such that the IHttpUrl.Domain includes the part matched by the most recent URL resolver.
IHttpUrl
WithHttps(this IHttpUrl url, bool https)
Returns a new URL consisting of the specified URL but with the protocol changed.
IHttpUrlReturns a new URL consisting of the specified URL without the query string.
IHttpUrl
WithoutQuery(this IHttpUrl url, string name)
Returns a new URL consisting of the specified URL with the specified query parameter removed.
IHttpUrl
WithoutQuery(this IHttpUrl url, params string[] names)
Returns a new URL consisting of the specified URL with the specified query parameters removed.
IHttpUrl
WithoutQuery(this IHttpUrl url, IEnumerable<string> names)
IHttpUrl
WithoutQuery(this IHttpUrl url, HashSet<string> names)
IHttpUrl
WithParent(this IHttpUrl url, string pathOrSubdomain, bool useSubdomain = false, bool retainQueryParams = false)
Changes a URL’s subpath or subdomain relative to the most recent URL resolver.
IHttpUrl
WithParents(this IHttpUrl url, int levels, string pathOrSubdomain, bool useSubdomain = false, bool retainQueryParams = false)
Changes a URL’s subpath or subdomain relative to the specified number of URL resolvers.
IHttpUrl
WithPath(this IHttpUrl url, string path)
Returns a new URL with the IHttpUrl.Path changed. The path must be empty or begin with a forward slash, and must not contain a query string.
IHttpUrlReturns a new, equivalent URL whose IHttpUrl.Path is empty (treating it like the result of a nested URL resolver).
IHttpUrl
WithPathOnly(this IHttpUrl url, string path)
Returns a new URL with the IHttpUrl.Path changed and the query string removed. The path must be empty or begin with a forward slash, and must not contain a query string.
IHttpUrl Returns a new, equivalent URL such that the IHttpUrl.Path includes the part matched by the most recent URL resolver.
IHttpUrl
WithQuery(this IHttpUrl url, string name, string value)
Returns a new URL consisting of the specified URL with the specified query parameter replaced with the specified value.
IHttpUrl
WithQuery(this IHttpUrl url, string name, IEnumerable<string> values)
Returns a new URL consisting of the specified URL with the specified query parameter replaced with the specified set of values.
IHttpUrl
WithQuery(this IHttpUrl url, string name, params string[] values)