UriHelper.Encode(Uri) Method

Definition

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.

public:
 static System::String ^ Encode(Uri ^ uri);
public static string Encode (Uri uri);
static member Encode : Uri -> string
Public Function Encode (uri As Uri) As String

Parameters

uri
Uri

The Uri to encode.

Returns

The encoded string version of uri.

Applies to