I want to expose my model in an API using plumber. I have followed and adapted Shinrin Glander's blog post (https://shirinsplayground.netlify.app/2018/01/plumber/) to use a POST + json data (1 row of my data frame) request.
I am stuck adapting the POST method in the 'plumber.R' to accept a json data.frame with
tibble::tibble(dfr) %>% as.list() %>% jsonlite::toJSON(.)
I can bypass the issue using purrr::map_df
with the row index but I am not sure it is a good practice. The API will be linked to a Shiny app, the request should not be too large. Can someone advise me on this point please ?