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
0
votes
2 answers

curl POST statement to RCurl or httr

I have this working curl statement to post a file to Nokia's HERE batch geocoding service... curl -X POST -H 'Content-Type: multipart/form-data;boundary=----------------------------4ebf00fbcf09' \ --data-binary @example.txt \ …
cory
  • 6,529
  • 3
  • 21
  • 41
0
votes
0 answers

Get oauth_callback for Deployed R Shiny Application

I have a Shiny application that uses the Instagram API, and needs an access token. When running locally, I am able to use full_url <-oauth_callback() full_url <- gsub("(.*localhost:[0-9]{1,5}/).*", x=full_url, replacement="\\1") print(full_url) to…
rkade93
  • 3
  • 4
0
votes
2 answers

Why different results with XPath 1.0 and RCurl vs httr, using substring-before an expression

When I use XPath 1.0's substring-before or -after in an expression, something happens that makes my subsequent xmlValue call throw an error. The code below shows that the XPath expression works fine with httr, but then doesn't work with…
lawyeR
  • 7,488
  • 5
  • 33
  • 63
0
votes
1 answer

r-project {httr} POST authentication gets HTTP ERROR 411 from IIS7.5

yI'm using the {httr} package to log into an internal web application (Theradoc on IIS7.5) in order to scrape some html (infection) data. library(httr) POST("http://ahdc372n2", authenticate("foo", "bar"), encode="multipart"), verbose()) The verbose…
Colin
  • 930
  • 3
  • 19
  • 42
0
votes
1 answer

httr - parsing xml not as text, but still specifying encoding

I'm trying to scrape a website encoded in UTF-8 using the httr package, but apparently the content function of that package only allows for specifying the encoding if you parse the website as text. Unfortunately, I cannot parse it as text, since I…
user2987808
  • 1,387
  • 1
  • 12
  • 28
0
votes
0 answers

API call to github while knitting error 'needs an interactive environment'

My API call to github in the R-Studio console works just fine (httr package) but breaks whenever I attempt to knit a pdf. In the console I have to manually go to 'localhost:1410' when first authorizing my credentials but apparently this is unable to…
Ted Petrou
  • 59,042
  • 19
  • 131
  • 136
0
votes
1 answer

R httr POST request for signing in

I'm trying to log into bondora.com with using R httr POST request, because this site does not appear to be using authentication: library(httr) login <- "https://www.bondora.com/en/login" pars <- list( username = "MyUserName", password =…
maivel
  • 35
  • 2
  • 8
0
votes
0 answers

Check if webpage is busy?

I have written a script to to extract certain information from a site, the code runs fine but its awfully slow (i have compiled the function and enabled JIT), how can I check if the delay is due to web page traffic ? Any help would be appreciated…
Savi
  • 167
  • 1
  • 9
0
votes
2 answers

GET(url) returns error

When I use below command url = 'www.somesite.com' GET(url) I get below error - I am not sure what it relates to. Error in function (type, msg, asError = TRUE) : easy handled already used in multi handle
Savi
  • 167
  • 1
  • 9
0
votes
1 answer

bind character vector to list into dataframe

I have a list of URLs and have extracted the content as…
Henk
  • 3,634
  • 5
  • 28
  • 54
0
votes
2 answers

accessing dropbox files with spaces in path name using the api

This question is related to the my previous question reading raw data in R to be saved as .RData file using the dropbox api I am running into problems when my path includes non-url standard characters the db.file.name in the previous question is…
h.l.m
  • 13,015
  • 22
  • 82
  • 169
-1
votes
1 answer

R - Send json via httr::POST

Okay so my problem was already mentionend in several other threads, but I am not able to figure it out: I wrote the following code: my_list <- list( list(ids = c(100,200,300)) ) names(my_list) <- "Example" responseList <-…
KidLu
  • 163
  • 8
-1
votes
1 answer

Form submission via rvest/httr (VIES VAT validation)

Trying to get the results of a form using R, this method used to work with the previous url: https://ec.europa.eu/taxation_customs/vies/viesquer.do Here for VAT number FR23489967794. library(rvest) library(httr) headers = c( "User-Agent" =…
gaut
  • 5,771
  • 1
  • 14
  • 45
-1
votes
1 answer

How would I connect to this API from rapidapi in R?

I've never connected to an API in R and I am a bit confused on how to just approach it. I am looking to pull flight price data from rapid-api (I have an account) into my R console. Here is the API (to my knowledge) on their website, what script…
Jaskeil
  • 1,044
  • 12
  • 33
-1
votes
1 answer

timeout error when scraping web with GET() function in R

I was trying to download a file from https://old.nasdaq.com/screening/companies-by-name.aspx?letter=0&exchange=nyse&render=download in R with download.file() function. It turns out that the request was rejected by the host. Then I…
yu bai
  • 1
1 2 3
67
68