-
-
Save sckott/1cfa8324360c487ffc2a to your computer and use it in GitHub Desktop.
Post data with GET
This file contains hidden or 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(curl) | |
h <- new_handle() | |
handle_setform(h, limit = "3") | |
handle_setopt(h, customrequest = "POST") | |
handle_setheaders(h, | |
"X-HTTP-Method-Override" = "GET" | |
) | |
req <- curl_fetch_memory("http://data.techno-science.ca/api/3/action/package_list", handle = h) | |
jsonlite::fromJSON(rawToChar(req$content))$result | |
#> [1] "artifact-data-agriculture" "artifact-data-aviation" "artifact-data-bookbinding" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment