type Params = { [key: string]: string } const queryString = (params: Params) => Object.keys(params) .map(key => encodeURIComponent(key) + '=' + encodeURIComponent(params[key])) .join('&')