-
Notifications
You must be signed in to change notification settings - Fork 7
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: Expose axios interceptors #881
Conversation
5db7eb6
to
5a3ca1a
Compare
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.
Question would be:
Do we want to support both ways at the same time or only the new way in the future?
Because if we only use the new way in the future, then I think it would make more sense to provide a more convenient way to handle this.
Something like:
import axios from '@nextcloud/axios'
import { withPasswordConfirmation } from '@nextcloud/password-confirmation'
withPasswordConfirmation(axios).post('a/dangerous/route')
Where withPasswordConfirmation
would add a once-time interceptor to the request that adds the password header.
What do you think?
I was looking for something like that indeed ! |
6707df4
to
e23cd69
Compare
338fe4b
to
b608c82
Compare
b608c82
to
4aa17c7
Compare
4aa17c7
to
cdfe8ca
Compare
Signed-off-by: Louis Chemineau <louis@chmn.me>
cdfe8ca
to
259dc89
Compare
This eases requesting for password confirmation