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

Global beforeHooks #25

Open
danielo515 opened this issue Sep 30, 2016 · 2 comments
Open

Global beforeHooks #25

danielo515 opened this issue Sep 30, 2016 · 2 comments

Comments

@danielo515
Copy link

Hello,

Sometimes there are some hooks that I would like to run for every request on the stream (for example, for include certain common header).

Currently there is no way to do this. At first instance I though that beforeMain was for that, but this is a mistake from my side ,probably because the total absence of a clear usage example of beforeMain. BeforeMain should be a list of REST request, probably for getting some cookie or something like that.

Would it be possible to impelemnt a beforeHooks configurable at flow level insted of just request?

Thanks and regards

@jeffbski
Copy link
Owner

Sorry for the delay in getting back to you. Yes it would be possible, maybe we'd add a beforeEach and afterEach hooks that would run immediately before and after each request.

Would that work for your use case?

@danielo515
Copy link
Author

Yes, that will definitely fit my use-case. But some data may be required, like the request, a callback and that stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants