Function: serializeParams()
ts
function serializeParams(
params?: object,
strict_validation?: boolean,
sortProperties?: boolean,
encodeSerialisedValues?: boolean,
arrayFormat?: "comma" | "repeat" | undefined
): string;Serialise a (flat) object into a query string
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
params? | object | {} | the object to serialise |
strict_validation? | boolean | false | throw if any properties are undefined |
sortProperties? | boolean | true | sort properties alphabetically before building a query string |
encodeSerialisedValues? | boolean | true | URL encode value before serialising |
arrayFormat? | "comma" | "repeat" | undefined | 'comma' | array representation, defaulting to legacy comma coercion |
Returns
string
the params object as a serialised string key1=value1&key2=value2&etc