-
Notifications
You must be signed in to change notification settings - Fork 260
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
Improved documentation for forward()
#831
Comments
@JosiahParry nah. I'm with you on forward(). It's an us problem :) |
I agree it is confusing. I have been leaving that alone as I don't like the design (and therefore don't want to promote it with docs). I hope sooner than later we can get middleware and just silently ignore filters/ Few notes to hopefully clear things up:
|
Thanks, Barret! So to be clear, forward() does not enable the passing to another endpoint? Say from a get to a post? |
Correct. It does not enable passing the route. It is more of "if |
To answer your specific question...
By the time the filter is being executed, |
plumber/R/plumber-step.R
Line 3 in 06e46f3
The documentation for
forward()
is rather slim. Upon reading the function documentation it is unclear how the function is to be used.For more about this function I navigated to the article "Routing and Input" which states "...then calls forward() to pass control to the next handler in the pipeline (another filter or an endpoint)" which makes me believe that you can use foward() to pass to another endpoint.
The example provides no clear description as to what is being forwarded and to where. Further all examples of forward() are within the context of filter.
Further documentation or examples would be helpful.
There's also the possibility that this is a uniquely me problem.
The text was updated successfully, but these errors were encountered: