【发布时间】:2020-07-28 05:13:28
【问题描述】:
我正在使用
export default axios.create({
baseURL: `https://api.openweathermap.org/data/2.5/onecall?`,
responseType: "json",
});
然后响应将其附加到请求中
const res = await weatherApi.get(
`lat=${lat}&lon=${lon}&appid=${KEY}&units=${unit}`
);
但最终结果是 https://api.openweathermap.org/data/2.5/onecall?/lat=53&lon=1.15&appid=keyremoved&units=metric
在onecall? axios 插入/ 之后,有没有办法禁用它?这违反了我的要求。
【问题讨论】: