I have the following curl
request:
curl --request GET --header "key: value" http://urlhere
How can I run the request in R?
I have the following curl
request:
curl --request GET --header "key: value" http://urlhere
How can I run the request in R?
You can use the GET
function:
library(httr)
r <- GET("http://urlhere", add_headers(key = value))
add_headers
allows you to add header data to your request.
If you use ?GET
you can see more information and options.
© 2022 - 2024 — McMap. All rights reserved.