export const getParamsToString = (obj) => { let str = ''; for (const key in obj) { str += `${key}=${obj[key]}&`; } return str.substr(0, str.length - 1); }; export const getParamsToString1 = (obj) => { let str = ''; for (const key in obj) { str += `${key}=${encodeURIComponent(obj[key])}&`; } return str.substr(0, str.length - 1); };