这是我的代码:
export const networkInterface = createNetworkInterface({
uri: API_URL
});
networkInterface.useAfter([{
async applyAfterware({ response }, next) {
let resCloned = response.clone();
if (resCloned.status === 401) {
// handle 401 error
}
next();
}
}]);
但是,当网络用401返回响应时,似乎固件无法正常工作。我在控制台中收到错误:POST https://myhost.com 401