Questions tagged [httr]

The R package 'httr' provides useful tools for working with HTTP connections. It is a simplified wrapper built on top of 'RCurl'.

The R package httr provides useful tools for working with HTTP connections. It is a simplified wrapper built on top of RCurl. It is much much less configurable but because it only attempts to encompass the most common operations it is also much much simpler.

Resources:

1019 questions
12
votes
1 answer

Submit POST form when rvest doesn't recognize submit button

I would like to submit the following form (the form appears after you click on link "Kliknite na ..."): http://www1.biznet.hr/HgkWeb/do/extlogon I have to enter one parameter, named "OIB" and submit the form by clicking "Trazi". Here is my…
Mislav
  • 1,533
  • 16
  • 37
12
votes
1 answer

httr request with multiple headers in r

I'm trying to make a request from httr package in R: POST(url = "https://website.com/api/waterfalls", query = list(itemsPerPage="10", page="1", sortAsc="true", sortBy="priority"), add_headers(c('Authorization'='Bearer…
Yos
  • 1,276
  • 1
  • 20
  • 40
12
votes
3 answers

R: Download image using rvest

I'm attempting to download a png image from a secure site through R. To access the secure site I used Rvest which worked well. So far I've extracted the URL for the png image. How can I download the image of this link using rvest? Functions…
G. Gip
  • 337
  • 1
  • 4
  • 10
12
votes
2 answers

how to authenticate a shibboleth multi-hostname website with httr in R

note: ipums international and ipums usa probably use the same system. ipums usa allows quicker signup. if you would like to test out your code, try https://usa.ipums.org/usa-action/users/request_access to sign up! i am trying to programmatically…
Anthony Damico
  • 5,779
  • 7
  • 46
  • 77
11
votes
2 answers

Successfully coercing paginated JSON object to R dataframe

I am trying to convert JSON pulled from an API into a data frame in R, so that I can use and analyze the data. #Install needed packages require(RJSONIO) require(httr) #request a list of companies currently fundraising using httr r <-…
verybadatthis
  • 1,448
  • 2
  • 14
  • 32
11
votes
1 answer

SSL verification causes RCurl and httr to break - on a website that should be legit

i'm trying to automate the login of the UK's data archive service. that website is obviously trustworthy. unfortunately, both RCurl and httr break at SSL verification. my web browser doesn't give any sort of warning. i can work around the issue…
Anthony Damico
  • 5,779
  • 7
  • 46
  • 77
11
votes
1 answer

Using RCurl/httr for Github Basic Authorization

I am trying to create an OAuth token from the command line using the instructions here. I am able to use curl from the command line, and get the correct response curl -u 'username:pwd' -d '{"scopes":["user", "gist"]}' \ …
Ramnath
  • 54,439
  • 16
  • 125
  • 152
10
votes
1 answer

Submit a form using POST with g-recaptcha-response argument

I want to submit a form from following web page: http://www.hzzo-net.hr/statos_OIB.htm First, I use 2captcha service to bypass recaptcha: # parameters api_key <- "c+++" api_url <- "http://2captcha.com/in.php" site_key <-…
Mislav
  • 1,533
  • 16
  • 37
10
votes
2 answers

Programmatically scraping a response header within R

I am trying to access the highlighted response header: location text in the screenshot below using only R and its curl-based webscraping libraries. one can easily get to this point in any web browser by visiting…
Anthony Damico
  • 5,779
  • 7
  • 46
  • 77
10
votes
1 answer

Scraping password protected forum in r

I have a problem with logging in in my script. Despite all other good answers that I found on stackoverflow, none of the solutions worked for me. I am scraping a web forum for my PhD research, its URL is http://forum.axishistory.com. The webpage I…
10
votes
1 answer

httr: retrieving data with POST()

Disclaimer: while I have managed to grab data from another source using httr's POST function, let it be known that I am a complete n00b with regards to httr and HTML forms in general. I would like to bring some data directly into R from a website…
circld
  • 632
  • 1
  • 7
  • 14
10
votes
1 answer

How correctly use request header with API data requests?

I'm trying to find the way to connect to Appannie's API with R using the httr package (have no experience with API connection at all). The API requires to include the request header Citation from appannie's site: Register an App Annie account and…
andrew-zmeul
  • 121
  • 1
  • 1
  • 10
10
votes
2 answers

how to download a large binary file with RCurl *after* server authentication

i originally asked this question about performing this task with the httr package, but i don't think it's possible using httr. so i've re-written my code to use RCurl instead -- but i'm still tripping up on something probably related to the…
Anthony Damico
  • 5,779
  • 7
  • 46
  • 77
9
votes
1 answer

R: fetching pdf documents from Companies House API

I'm trying to fetch documents from the API using R. Appreciate the clarification of the process in this post. I've been following the above steps with partial success, but still fail the last step to get access to documents' content: Find the…
Kasia Kulma
  • 1,683
  • 1
  • 14
  • 39
9
votes
2 answers

authentication to github private repositories with httr

I am trying to access a private repository on Github using httr. I am able to do so with no problem if I add my github token (stored as an environment variable in…
AndrewMacDonald
  • 2,870
  • 1
  • 18
  • 31
1
2
3
67 68