HttpEncoder.UrlPathEncode(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Encodes a subsection of a URL.
protected public:
virtual System::String ^ UrlPathEncode(System::String ^ value);
protected internal virtual string UrlPathEncode (string value);
abstract member UrlPathEncode : string -> string
override this.UrlPathEncode : string -> string
Protected Friend Overridable Function UrlPathEncode (value As String) As String
Parameters
- value
- String
The string to encode.
Returns
A URL-encoded string.
Remarks
The UrlPathEncode method is called by the UrlPathEncode method. The UrlPathEncode method performs the following steps:
Applies the encoding logic of the UrlPathEncode method to only the path part of the URL (which excludes the query string). The method assumes that the URL is encoded as a UTF-8 string.
Encodes non-spaces so that only a subset of the first 128 ASCII characters is used in the resulting encoded string. Any characters at Unicode value 128 and greater, or 32 and less, are URL-encoded.
Encodes spaces as %20.
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈