UriHelper.BuildRelative Method

Definition

Combines the given URI components into a string that is properly encoded for use in HTTP headers.

public static string BuildRelative (Microsoft.AspNetCore.Http.PathString pathBase = default, Microsoft.AspNetCore.Http.PathString path = default, Microsoft.AspNetCore.Http.QueryString query = default, Microsoft.AspNetCore.Http.FragmentString fragment = default);
static member BuildRelative : Microsoft.AspNetCore.Http.PathString * Microsoft.AspNetCore.Http.PathString * Microsoft.AspNetCore.Http.QueryString * Microsoft.AspNetCore.Http.FragmentString -> string
Public Function BuildRelative (Optional pathBase As PathString = Nothing, Optional path As PathString = Nothing, Optional query As QueryString = Nothing, Optional fragment As FragmentString = Nothing) As String

Parameters

pathBase
PathString

The first portion of the request path associated with application root.

path
PathString

The portion of the request path that identifies the requested resource.

query
QueryString

The query, if any.

fragment
FragmentString

The fragment, if any.

Returns

The combined URI components, properly encoded for use in HTTP headers.

Applies to