我目前正在手动构建一个假客户端,并将拦截器传递给它进行授权。我想有一个更聪明的一些响应码的Retryer。
public class myErrorEncoder extends ErrorDecoder.Default {
@Override
public Exception decode(final String methodKey, final Response response) {
if (response.status() == 401) {
String token = refreshToken(); // I would like to refres
我在做一个公理调用。
我的守则:
loginSAP () {
var config = {
url: 'http://linkToSAPoDataService/oDataSet?&format=json',
withCredentials: true
}
this.axios(config)
}
需要先登录才能访问我的数据库。
我登录后,我得到:
Failed to load resource: the server responded with a status of 401 (Unauthorized)
createError.js:1