Skip to content
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

Support handling 304 status code in onResponse flow #1

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

tristan-vrt
Copy link
Collaborator

In Dio a 304 not modified can be configured to be a valid status:
BaseOptions(validateStatus: (status) => status != null && ((status >= 200 && status < 300) || status == 304))

This PR allows 304's to be handled in the onResponse flow.
This way (having not modified as a valid status) the usual chain of onResponse interceptors will still trigger, unlike the error flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants