Encoding query string URI parameters for REST requests - #7683.
This commit is contained in:
parent
dcada36111
commit
6cebd08aec
|
@ -46,7 +46,7 @@ export function buildQueryString(obj) {
|
|||
if (str !== "") {
|
||||
str += "&"
|
||||
}
|
||||
str += `${key}=${value || ""}`
|
||||
str += `${key}=${encodeURIComponent(value || "")}`
|
||||
}
|
||||
}
|
||||
return str
|
||||
|
|
|
@ -215,7 +215,7 @@ module RestModule {
|
|||
}
|
||||
}
|
||||
|
||||
const main = `${path}?${queryString}`
|
||||
const main = `${path}?${encodeURIComponent(queryString)}`
|
||||
let complete = main
|
||||
if (this.config.url && !main.startsWith("http")) {
|
||||
complete = !this.config.url ? main : `${this.config.url}/${main}`
|
||||
|
|
Loading…
Reference in New Issue