-
-
Notifications
You must be signed in to change notification settings - Fork 15
feat: add runtime hooks for API request and response handling #89
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: add runtime hooks for API request and response handling #89
Conversation
β Deploy Preview for nuxt-api-party ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
Build failures may be related to nuxt/nuxt#29263 |
|
Another banger from you. π€― Thanks a lot, @mattmess1221! |
2aa20ec to
01b63e4
Compare
|
Those hooks are what I was looking for. I wanted to dynamically update the Authorization headers based on the request received (i.e If defined in the request as Bearer don't change it and else I'll be adding the Basic header - for an oauth app with custom oauth server) |
|
@froozeify did it end up working out? was going to use the hooks to set the auth token header but I'm wondering if with refresh tokens it would be more trouble than it's worth |
|
I managed to work around the build typechecking issues by importing directly from Other things I've done
Docs probably need some work. |
|
@mattmess1221 Thanks a lot for the updates and patience on review. Great work! π Let's release and iterate. Some thoughts:
|
π Linked issue
Related to #87 and #88
β Type of change
π Description
I'm marking this as a draft because some decisions need to be made about which endpoints will trigger a hook.
Should
client -> server -> backendsend a hook on the client and server, or just the server?π Checklist