-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: make requests extendable by adding requestMiddleware
to provider options
#1822
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one @nedsalk
I would change the PR title to something that includes the word ' |
requestMiddleware
to provider options
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @nedsalk. Should this be documented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @danielbate, we need some docs examples about this feature.
@danielbate @Torres-ssf Added docs in a1e6dc4 and 10d7176. |
Coverage Report:
Changed Files:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super clean 🥇
This PR introduces a
requestMiddleware
callback as a way to modify the request object for every fetch call made towards the network. I didn't ponder about adding the capability for modifying the request object on a per-call basis because that'd be a bigger piece of work and we need at least this functionality for a bugfix on our apps related to sticky session cookies not being included. You can find more on that in the related issue.closes #1821