utils.ts 246 B

123456789101112
  1. function objectToUrlEncoded (obj: any) {
  2. const str: string[] = []
  3. for (const key of Object.keys(obj)) {
  4. str.push(encodeURIComponent(key) + '=' + encodeURIComponent(obj[key]))
  5. }
  6. return str.join('&')
  7. }
  8. export {
  9. objectToUrlEncoded
  10. }