-
Notifications
You must be signed in to change notification settings - Fork 191
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 modifying transport request objects before request is sent #324
Comments
Workaround: Cloned the contents of
But... updates to lib most likely to break this anytime soon... |
Re-purposing this ticket to generically support a way to modify or call additional methods on the request object before it is sent. This should address the |
A good solution to this problem should permit an application author to introduce any of the following into their request chain:
This may also be useful for custom authentication providers. |
@kadamwhite Your proposed solution sounds 💯. I see this "in progress" for the 2.0 project. Is there a WIP branch anywhere one could review? Or is this not quite started and open for contribution? |
@joshlevinson Sorry for the delayed response; between day job and the core WordPress REST API component, I haven't given this project as much love as it deserves this year. You're correct, I have yet to implement anything; I was focusing previously on figuring out how to introduce a new transport using |
How to access superagent's request obj?
I need to call
withCredentials()
on the request obj to deal with CORS. How to do it without overriding all the methods thathttp-transport
exports (delete, get, head, post, put)?The text was updated successfully, but these errors were encountered: