Encoding query string URI parameters for REST requests - #7683.
This commit is contained in:
parent
86c8618e8f
commit
2fb96b29c9
|
@ -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