library(httr) | |
params <- list( | |
text="The food was great, but the service was slow.", | |
terms="1", | |
sentiment="1", | |
annotate="1" | |
) | |
headers <- add_headers("<ACCESS-KEY-HEADER>"="<ACCESS-KEY>") | |
response <- POST( | |
"<ACCESS-URL>", | |
headers, | |
body=params | |
) | |
stop_for_status(response) | |
content(response, "parsed", "application/json") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment