Skip to content

QueryParams

[Source]

Builds a URL query string from key-value pairs with RFC 3986 percent-encoding. Returns an empty string for an empty array, or "?key1=val1&key2=val2" otherwise.

Both keys and values are encoded: only unreserved characters (A-Z, a-z, 0-9, -, ., _, ~) pass through; everything else becomes %XX. This includes characters like & and = that the http library's URLEncode with URLPartQuery would leave unencoded.

let params = recover val
  [("state", "open"); ("labels", "bug")]
end
let query = QueryParams(params) // "?state=open&labels=bug"
primitive val QueryParams

Constructors

create

[Source]

new val create()
: QueryParams val^

Returns


Public Functions

apply

[Source]

fun box apply(
  params: Array[(String val , String val)] val)
: String val

Parameters

Returns


eq

[Source]

fun box eq(
  that: QueryParams val)
: Bool val

Parameters

Returns


ne

[Source]

fun box ne(
  that: QueryParams val)
: Bool val

Parameters

Returns