Skip to content

URLSearchParams

Values

append

Appends a specified key/value pair as a new search parameter. Read more on MDN

let append: (
WebAPI.FetchAPI.urlSearchParams,
~name: string,
~value: string,
) => unit

Parameters

WebAPI.FetchAPI.urlSearchParams string string

Return type

unit

delete

Deletes the given search parameter, and its associated value, from the list of all search parameters. Read more on MDN

let delete: (
WebAPI.FetchAPI.urlSearchParams,
~name: string,
~value: string=?,
) => unit

Parameters

WebAPI.FetchAPI.urlSearchParams string option< string >

Return type

unit

get

Returns the first value associated to the given search parameter. Read more on MDN

let get: (WebAPI.FetchAPI.urlSearchParams, string) => string

Parameters

WebAPI.FetchAPI.urlSearchParams string

Return type

string

getAll

Returns all the values association with a given search parameter. Read more on MDN

let getAll: (WebAPI.FetchAPI.urlSearchParams, string) => array<string>

Parameters

WebAPI.FetchAPI.urlSearchParams string

Return type

array< string >

has

Returns a Boolean indicating if such a search parameter exists. Read more on MDN

let has: (
WebAPI.FetchAPI.urlSearchParams,
~name: string,
~value: string=?,
) => bool

Parameters

WebAPI.FetchAPI.urlSearchParams string option< string >

Return type

bool

make

let make: (
~init: array<array<string>>=?,
) => WebAPI.FetchAPI.urlSearchParams

Parameters

option< array< array< string > > >

Return type

WebAPI.FetchAPI.urlSearchParams

make2

let make2: (
~init: WebAPI.Prelude.any=?,
) => WebAPI.FetchAPI.urlSearchParams

Parameters

option< WebAPI.Prelude.any >

Return type

WebAPI.FetchAPI.urlSearchParams

make3

let make3: (~init: string=?) => WebAPI.FetchAPI.urlSearchParams

Parameters

option< string >

Return type

WebAPI.FetchAPI.urlSearchParams

set

Sets the value associated to a given search parameter to the given value. If there were several values, delete the others. Read more on MDN

let set: (
WebAPI.FetchAPI.urlSearchParams,
~name: string,
~value: string,
) => unit

Parameters

WebAPI.FetchAPI.urlSearchParams string string

Return type

unit

sort

let sort: WebAPI.FetchAPI.urlSearchParams => unit

Parameters

WebAPI.FetchAPI.urlSearchParams

Return type

unit