How should i handle shouldInterceptRequest when you have interceptRequest
charlo2433 opened this issue · comments
Do you have a question regarding how to use the plugin? Please describe.
A clear and concise description of what the question is. Ex. How do I retry a request? [...]
@OverRide
Future interceptRequest({required BaseRequest request}) async{
try {
var token = await GetStorage().read('token');
request.headers["Content-type"] = "application/json";
request.headers["Accept"] = "application/json";
request.headers["Authorization"] = "Bearer " + token;
} catch (e) {
print(e);
}
return request;
}
@OverRide
Future shouldInterceptRequest() {
// TODO: implement shouldInterceptRequest
throw true;
}