Function: withQueryParams()¶
withQueryParams(
url,params?):string
Defined in: helpers/url.ts:16
Helper to create a new URL by appending parameters to a base URL.
The input URL may or may not having existing parameters.
Example¶
// Returns `"/someApi/someEndpoint?token=asdf&limit=5"`
let url = withQueryParams("/someApi/someEndpoint", {token: "asdf", limit: 5});
Parameters¶
| Parameter | Type |
|---|---|
url |
string |
params? |
{[key: string]: any; } |
Returns¶
string