I am trying to build a simple api using httpuv package. The documentation says that one could use the same Rook definition. While using the Rook package one can simple use:
req$POST()
I haven't been able to figure out how to manage simple HTTP POST requests and get their body.
Any hints?
I finally got it working. I found the answer lying somewhere in the opencpu package.
Simply read the POST body stream using:
input <- req[["rook.input"]];
postdata <- input$read_lines();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With