Class CaseHandlingUriBuilder
Optimized helper methods for generating encoded Uris from URI components. Much of this code has been adapted from the MIT licensed .NET runtime.
Inherited Members
Namespace: SixLabors.ImageSharp.Web
Assembly: SixLabors.ImageSharp.Web.dll
Syntax
public static class CaseHandlingUriBuilder
Methods
| Improve this Doc View SourceBuildAbsolute(CaseHandlingUriBuilder.CaseHandling, HostString, PathString, PathString, QueryString)
Combines the given URI components into a string that is properly encoded for use in HTTP headers. Note that unicode in the HostString will be encoded as punycode.
Declaration
public static string BuildAbsolute(CaseHandlingUriBuilder.CaseHandling handling, HostString host, PathString pathBase = default(PathString), PathString path = default(PathString), QueryString query = default(QueryString))
Parameters
Type | Name | Description |
---|---|---|
CaseHandlingUriBuilder.CaseHandling | handling | Determines case handling for the result. |
HostString | host | The host portion of the uri normally included in the Host header. This may include the port. |
PathString | pathBase | The first portion of the request path associated with application root. |
PathString | path | The portion of the request path that identifies the requested resource. |
QueryString | query | The query, if any. |
Returns
Type | Description |
---|---|
String | The combined URI components, properly encoded for use in HTTP headers. |
BuildRelative(CaseHandlingUriBuilder.CaseHandling, PathString, PathString, QueryString)
Combines the given URI components into a string that is properly encoded for use in HTTP headers.
Declaration
public static string BuildRelative(CaseHandlingUriBuilder.CaseHandling handling, PathString pathBase = default(PathString), PathString path = default(PathString), QueryString query = default(QueryString))
Parameters
Type | Name | Description |
---|---|---|
CaseHandlingUriBuilder.CaseHandling | handling | Determines case handling for the result. |
PathString | pathBase | The first portion of the request path associated with application root. |
PathString | path | The portion of the request path that identifies the requested resource. |
QueryString | query | The query, if any. |
Returns
Type | Description |
---|---|
String | The combined URI components, properly encoded for use in HTTP headers. |
Encode(CaseHandlingUriBuilder.CaseHandling, String)
Generates a string from the given absolute or relative Uri that is appropriately encoded for use in HTTP headers. Note that a unicode host name will be encoded as punycode.
Declaration
public static string Encode(CaseHandlingUriBuilder.CaseHandling handling, string uri)
Parameters
Type | Name | Description |
---|---|---|
CaseHandlingUriBuilder.CaseHandling | handling | Determines case handling for the result. |
String | uri | The Uri to encode. |
Returns
Type | Description |
---|---|
String | The encoded string version of |
Encode(CaseHandlingUriBuilder.CaseHandling, Uri)
Generates a string from the given absolute or relative Uri that is appropriately encoded for use in HTTP headers. Note that a unicode host name will be encoded as punycode.
Declaration
public static string Encode(CaseHandlingUriBuilder.CaseHandling handling, Uri uri)
Parameters
Type | Name | Description |
---|---|---|
CaseHandlingUriBuilder.CaseHandling | handling | Determines case handling for the result. |
Uri | uri | The Uri to encode. |
Returns
Type | Description |
---|---|
String | The encoded string version of |