Exploratory Community

How to make an HTTP POST request with Exploratory

#1

Here is a simple example for an HTTP POST request with R Script Data Frame. Once you get a result, you can convert the result into a data frame.

library(httr)
r <- POST("https://reqbin.com/echo/post/json", accept_json())
#convert to text object using httr
result <- content(r, as="text")
#parse JSON
data.frame(fromJSON(result))

For the httr package details, please refer https://httr.r-lib.org/