Closed nick-youngblut closed 10 months ago
httr has been superseded in favour of httr2, so is no longer under active development. But it sounds like your issue is really about how to create JSON from an R data structure, so you may find it easier to iterate directly with jsonlite::toJSON()
.
Currently the httr vignette only shows a simple example of creating a request body:
It would be helpful to have more complex body example, given that POST requests can require formats such as:
...and naively trying to create such a structure in R with any of the following approaches does not work:
In each approach, the resulting data structure is not
list(vector(list()))
.The POST function docs also do not describe how to create such a data structure in R.