Skip to content

Commit

Permalink
fix: uri_encode
Browse files Browse the repository at this point in the history
  • Loading branch information
caioagiani committed Feb 17, 2021
1 parent 98c730c commit b0544c9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utils/url.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module.exports = {
urlEncode(query) {
const queryEncode = Object.keys(query)
.map((key) => `${key}=${query[key]}`)
return Object.keys(query)
.map(
(key) => `${encodeURIComponent(key)}=${encodeURIComponent(query[key])}`
)
.join('&');

return queryEncode;
},
};

0 comments on commit b0544c9

Please sign in to comment.