FormEncoder¶
Encode key-value pairs as application/x-www-form-urlencoded body data.
Uses WHATWG form encoding: spaces become +, unreserved characters
(A-Z a-z 0-9 * - . _) pass through, everything else is %XX.
Returns Array[U8] val because the output is used as a request body,
matching HTTPRequest.body's type. Use QueryParams instead when building
URL query strings (which use RFC 3986 encoding and return String).
Constructors¶
create¶
Returns¶
- FormEncoder val^
Public Functions¶
apply¶
Encode params as form-urlencoded body data.
Keys and values are encoded per WHATWG spec. Pairs are joined with &.
Returns an empty array if params is empty.
Parameters¶
Returns¶
eq¶
Parameters¶
- that: FormEncoder val
Returns¶
- Bool val
ne¶
Parameters¶
- that: FormEncoder val
Returns¶
- Bool val