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

Pass in req and res directly to PlumberStep$exec(req, res) #666

Merged
merged 19 commits into from
Sep 3, 2020

Conversation

schloerke
Copy link
Collaborator

@schloerke schloerke commented Aug 31, 2020

  • De-duplicates all matched formal arguments to avoid an error while processing the route
    • (No error is thrown anymore)
  • Allow for unnamed arguments to be passed through to endpoint

PR task list:

  • Update NEWS
  • Add tests
  • Update documentation with devtools::document()

This avoids circular dependencies when setting in filters and reading within the route.

This also matches historical behavior. So it's a welcome change.
R/plumber-step.R Outdated Show resolved Hide resolved
NEWS.md Outdated Show resolved Hide resolved
R/plumber-step.R Outdated Show resolved Hide resolved
@cpsievert cpsievert self-requested a review September 1, 2020 19:31
Copy link
Contributor

@cpsievert cpsievert left a comment

Choose a reason for hiding this comment

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

LGTM pending suggestions

@schloerke
Copy link
Collaborator Author

@jcheng5 gentle ping

NEWS.md Outdated Show resolved Hide resolved
R/plumber-step.R Outdated Show resolved Hide resolved
R/plumber-step.R Outdated Show resolved Hide resolved
R/plumber-step.R Outdated Show resolved Hide resolved
R/plumber-step.R Outdated Show resolved Hide resolved
R/plumber-step.R Outdated Show resolved Hide resolved
R/plumber.R Outdated Show resolved Hide resolved
R/plumber.R Outdated Show resolved Hide resolved
@schloerke schloerke merged commit 820af6b into master Sep 3, 2020
@schloerke schloerke deleted the exec_req_res branch September 3, 2020 21:31
schloerke added a commit that referenced this pull request Sep 3, 2020
* master:
  Pass in `req` and `res` directly to `PlumberStep$exec(req, res)` (#666)
  Make `postBody` a delayed assignment. Allows for removal of option. (#665)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants