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

Add endpoint hook support #439

Open
schloerke opened this issue May 23, 2019 · 0 comments
Open

Add endpoint hook support #439

schloerke opened this issue May 23, 2019 · 0 comments
Assignees
Labels
difficulty: advanced Best for maintainers to address effort: high 4+ days of work priority: medium Could be fixed before next release theme: plumb() ✨ `plumbBlock()` enhancements type: enhancement Adds a new, backwards-compatible feature

Comments

@schloerke
Copy link
Collaborator

Basically copy all registerHooks to be able to be added on the endpoints.

They would be executed after router endpoints are executed at each stage.

They should be able to programmatically defined for a router in a plumber.R file. Similar to filters right now, but per endpoint.

This allows users to white list their filters per route. HUGE

#' @endpointHook NAME1
function(req, res) {
  # do things
  forward()
}

#' @get
#' @hook STAGE NAME1 NAME2 NAME3
function(req, res) {
  # do things
  forward()
}

STAGE: preroute, postroute, preserialize, or postserialize

Official names TBD.

cc @blairj09

@schloerke schloerke added type: enhancement Adds a new, backwards-compatible feature difficulty: advanced Best for maintainers to address effort: high 4+ days of work priority: medium Could be fixed before next release labels May 23, 2019
@schloerke schloerke added this to the v0.5.0 - Next CRAN release milestone May 23, 2019
@schloerke schloerke self-assigned this May 23, 2019
@schloerke schloerke added the theme: plumb() ✨ `plumbBlock()` enhancements label Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: advanced Best for maintainers to address effort: high 4+ days of work priority: medium Could be fixed before next release theme: plumb() ✨ `plumbBlock()` enhancements type: enhancement Adds a new, backwards-compatible feature
Projects
None yet
Development

No branches or pull requests

2 participants