Open ljzms1212 opened 8 months ago
带有路径参数的路由,如果参数是中文,则无法请求接口,例如:
async function get() { var url = 'https://www.test.com/user-info/张三/xxxxx'; const option = { dataType: 'json', timeout: 120000, headers: { accept: 'application/json;charset=UTF-8' } }; // var result = await client.get(encodeURI(url),option); var result = await client.get(url, option); console.log(JSON.stringify(result)); } get();
带有路径参数的路由,如果参数是中文,则无法请求接口,例如: