HttpUrlEncodingCodec
一个 HttpParameterCodec,它使用 encodeURIComponent 和 decodeURIComponent 来序列化和解析 URL 参数的 key 和 value。 如果你传入未编码的查询参数,那么接收端可能会对这些参数进行错误解析。请使用 HttpParameterCodec 类对查询字符串的值进行编码和解码。
A class that uses encodeURIComponent and decodeURIComponent to serialize and parse URL parameter keys and values. If you pass URL query parameters without encoding, the query parameters can get misinterpreted at the receiving end. Use the HttpParameterCodec class to encode and decode the query-string values.
class HttpUrlEncodingCodec implements HttpParameterCodec {
encodeKey(key: string): string
encodeValue(value: string): string
decodeKey(key: string): string
decodeValue(value: string)
}