function objectToUrlEncoded (obj: any) { const str: string[] = [] for (const key of Object.keys(obj)) { str.push(encodeURIComponent(key) + '=' + encodeURIComponent(obj[key])) } return str.join('&') } export { objectToUrlEncoded }