在使用uniapp直接发送http请求时报
request:fail Illegal character in query at index 44:
解决方法
在发送请求时参数进行编码
let paramsStr = "请求参数";
let strUrl = encodeURIComponent(paramsStr); // 编码
const url = "http://url?strUrl="+strUrl;
uni.request({
method: "GET",
url: url,
}).then(res=>{
console.log(res);
}).catch(err=>{
console.error(err);
})