# Function: withQueryParams()

> **withQueryParams**(`url`, `params?`): `string`

Defined in: [helpers/url.ts:16](https://github.com/coda/packs-sdk/blob/b2b4c9dba5ca748bdbb94481cc13b5ca3c328ef6/helpers/url.ts#L16)

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`
