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

Expose network context to requestHook & responseHook scopes #2662



Copy link

The issue #2012 was talking about exposing the network context to the responseHook scope to be able to send new request from there.

I took the opportunity to expose the network context to the requestHook also to be able to send request in request hook. Personally I am interested by this to create a plugin to login automatically to a private api. If you prefer I can move the commit in another PR ;)

Closes #2012

Copy link
Contributor Author

Documentation should be updated ( / but I don't know how to update it 😅

I've noticed inconsistency on naming between `_applyRequestPluginHooks` and `_applyResponsePluginHooks` parameters.
Copy link

@develohpanda develohpanda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

What part of the documentation needs to be updated? Docs are hosted on HelpScout for various reasons, but if you post a diff/changes into a comment here I can go ahead and update HelpScout with it. (I don't think there are any changes required but I might be missing something)

@develohpanda develohpanda merged commit 64c7b42 into Kong:develop Sep 29, 2020
1 check passed
@jgiovaresco jgiovaresco deleted the fix/2012-expose-network-context branch December 2, 2020 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

[Improvement] Plugin API to send new request in response hook
2 participants