-
-
Save vpekar/b1ff0602a6f4efe2b44a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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