urlencode javascript
var url = encodeURIComponent('url');
js object to querystring
const params = {foo:"Hi", bar:"there"}
const queryString = new URLSearchParams(params).toString();
console.log(queryString);
js urlencode
/* There are 11 characters which are not encoded by encodeURI,
but encoded by encodeURIComponent. */
encodeURI("test uri");
// "test%20uri"
encodeURI("test uri");
// "test%20uri"
encodeURI("test uri/with a slash");
// "test%20uri/with%20a%20slash"
encodeURIComponent("test uri/with a slash");
// "test%20uri%2Fwith%20a%20slash"
javascript object to params string
var queryString = Object.keys(params).map(key => key + '=' + params[key]).join('&');
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us