HttpEncoder.UrlPathEncode(String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
对 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
参数
- value
- String
要编码的字符串。
返回
URL 编码的字符串。
注解
该方法 UrlPathEncode 由 UrlPathEncode 该方法调用。 该方法 UrlPathEncode 执行以下步骤:
将方法的 UrlPathEncode 编码逻辑应用于 URL 的路径部分(不包括查询字符串)。 该方法假定 URL 编码为 UTF-8 字符串。
对非空格进行编码,以便在生成的编码字符串中仅使用前 128 个 ASCII 字符的子集。 Unicode 值 128 及更高(或 32 及更低)的任何字符均采用 URL 编码。
将空格编码为 %20。