-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make request available in Interceptor.response/responseError #33
Comments
Yes, good idea! |
I'll try to work on this soon, but in the meantime it would be a good feature for someone interested in contributing! Here's what it would probably take:
|
I can have a shot at this sometime this week if you like? |
I have prepared a branch with the changes but I don't have the rights to publish to the repository (I have just submitted the a CLA). |
@bryanrsmith CLA is confirmed. |
Struggling to push local changes => git push origin include-original-request-in-interceptor-response-callbacks |
@timbell You have to first fork this repo.
Then It is common practice to |
… callbacks feat(interceptor): pass original request as a second parameter to response/responseError callbacks Pass original request to response/responseError callbacks to support, for example, handling 401 unauthorized errors by resubmitting the request with added credentials Closes aurelia#33
@gheoan - thanks. I've managed to submit something now - hopefully not too wrong... |
@bryanrsmith - sorry, I presume my commit comment closed this? |
Could the Interceptor.response and (especially) responseError methods be extended to include the original request? This would allow us to implement 401 handling with retry as can be done with http-client using HttpResponseMessage.requestMessage.
The text was updated successfully, but these errors were encountered: