【发布时间】:2019-09-10 12:18:26
【问题描述】:
在 Angular 6 中使用 HttpParams() 时,加号字符正在转换为空格字符。
是否有任何解决方案,例如在 Angular 中使用其他方法来设置 http 请求参数而不编码字符串化的 json 或不将 + 替换为 %2B 。
this.http.post(URl, testReqFormat, { headers: headers }).subscribe(
data => {
console.log("Test request success :: ", data);
},
error => {
console.log("Test request failed :: ", error);
});
【问题讨论】:
-
如果回答,请检查此链接:stackoverflow.com/questions/45428842/…