Is there a (documented) way to programmatically process a request ?
For example, I'd like to do:
PR <- pr("plumber.R") my_req <- create_a_request_object_here_somehow() response <- pr_process_request(PR, my_req)
By looking quickly at the code, I found
PR$call(req) PR$serve(req, res)
but that does not seem obvious how to create the corresponding
Is this related to Rook (GitHub - jeffreyhorner/Rook: A web server interface for R) ?
Why would I want to do that ?
Because I want to use plumber in a AWS lambda function, running some R code.
The http requests are not directly exposed to the R code. They need to be fetched from the aws lamda runtime API (next_invocation). I could run a plumber http server, and forward explicitly the request, but that seems like an overkill.