Documentation
¶
Index ¶
- func BuildParams(params interface{}, noUrlEncode ...bool) (encodedParamStr string)
- func BuildQuery(queryData url.Values) string
- func Decode(str string) (string, error)
- func Encode(str string) string
- func ParseURL(str string, component int) (map[string]string, error)
- func RawDecode(str string) (string, error)
- func RawEncode(str string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildParams ¶
BuildParams builds the request string for the http client. The <params> can be type of: string/[]byte/map/struct/*struct.
The optional parameter <noUrlEncode> specifies whether ignore the url encoding for the data.
func BuildQuery ¶
BuildQuery Generate URL-encoded query string. See http://php.net/manual/en/function.http-build-query.php.
func Decode ¶
Decode DecodeUint32 does the inverse transformation of Encode, converting each 3-byte encoded substring of the form "%AB" into the hex-decoded byte 0xAB. It returns an errors if any % is not followed by two hexadecimal digits.
func ParseURL ¶
ParseURL Parse a URL and return its components. -1: all; 1: scheme; 2: host; 4: port; 8: user; 16: pass; 32: path; 64: query; 128: fragment. See http://php.net/manual/en/function.parse-url.php.
func RawDecode ¶
RawDecode URL-encoded strings. See http://php.net/manual/en/function.rawurldecode.php.
Types ¶
This section is empty.