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'.

0
votes
0answers
15 views

jsonlite: toJSON on object from Python's requests package leads to arrays, direct call to API does not

I'm playing around with some Fantasy Premier League data available through an API. Desired result, nested dataframes, is achieved when running the following code: library(jsonlite) url <- "https:/...
3
votes
0answers
33 views

How can I use set_config with httr to route queries through a proxy in R?

I am trying to build a web scraper that uses proxies, because its repetitive behavior over a large website resulted in an IP ban. I am running into trouble, however, as setting a proxy using the ...
0
votes
1answer
47 views

How to get ALL shopify orders via API (limited to 250)

Hi I am trying to get all Orders from a shopify store via shopify API, I am using an R script and so far I am only able to get 250 records that is the limit per page, if I dont use the limit keyword ...
0
votes
0answers
22 views

Using httr to place orders through BitMex API

I'm trying to use the httr R package to place orders on BitMex through their API. I found some guidance over here, and after specifying both my API key and secret in respectively the objects K and S,...
1
vote
1answer
29 views

Error “xpath_search” after trying to scrape the website with “xml_find_all”

I'm new at R. I'm trying to scrape a public website which contains the number of prisioners and vacancies in prison in the state of São Paulo, in Brazil. I'm a journalist and I asked the state for ...
-2
votes
0answers
26 views

Web scraping XHR objects with httr in R

I am trying to scrape the daily table in the following link: https://www.whoscored.com/LiveScores I use Chrome to open the web developer tools and discover that I have to use the following URL: https:...
0
votes
0answers
29 views

Webscraping error in curl in R for one particular website

I am trying to scrape a website using rvest package. And whatever I have tried I have still problems with starting an html_session. library(rvest) library(httr) session <- html_session("https://...
0
votes
0answers
32 views

How correctly to build soap request in R

I am trying to build soap request to login into polish REGON API. I tried quite a few ways found on Internet, but none of them worked. Based of API manual login request has such a xml structure: <...
0
votes
1answer
75 views

Problem with authorization to COINAPI REST API with custom header and key in R

I would like to connect to COINAPI resources. They provide two types of authorization. https://docs.coinapi.io/#authorization Custom authorization header named X-CoinAPI-Key Query string parameter ...
0
votes
0answers
13 views

How can I send a GET request without waiting for the response

I am trying to run a GET request inside a shinyApp, but I don't want to wait for the response as it would take quite a long time to process and I dont need really need the response inside the shinyApp,...
0
votes
1answer
16 views

How to use proxies with urls in R?

I am trying to use proxies with my request urls in R. It changes my requested url from "www.abc.com/games" to "www.abc.com/unsupportedbrowser" The proxies are working since I tested them in python. ...
0
votes
0answers
42 views

Issues logging in to LinkedIn via rvest

Starting to experiment with web scraping using the rvest package - specifically from websites which require login. As a starter for 10, I have been trying to log in to LinkedIn, since I found some ...
0
votes
1answer
30 views

Scraping Data using R - Form with List in POST

I am trying to scrape some web data using the API that I can see is being called by viewing the Safari Network Tab. Either the API doesn't seem to get the form parameters correctly if passed as ...
0
votes
0answers
31 views

How do I create a URL callback function in R?

I am trying to get my head around URL callbacks in R. I can send a call to the server's URL using httr::content(GET(..)) In my call I need to give my callback url and then listen for a response back. ...
1
vote
0answers
38 views

Missing Parameters using POST in R for API

I am currently using POST function (package httr) to submit some texts to an API to get processed output, my code is wrote as follows. url ="..." client_id ="..." client_secret ="..." request_body ...
0
votes
0answers
19 views

POST request params in R

I am trying to reproduce a POST request code written in python to R. The code is import requests url ='https://path/to/url' auth = ('<username>', '<password>') file ='path/to/...
2
votes
1answer
128 views

Hard crash when calling httr::oauth_service_token() - double free or corruption (fasttop)

I am authorizing an google analytics API using httr on a remote server running linux. The code has worked flawlessly until now, and it still works on our local machines. Unfortunately since this is ...
0
votes
0answers
23 views

Redirecting A HTTP Get Request in R

I am pulling data from a financial data providers API and I am having problems pulling bulk data. IT support told me that for bulk data they save the data to an AWS storage and send a redirect link. ...
0
votes
2answers
36 views

JSON array in “body” parameter of httr::POST()

I want to send a post request with a few variables in the body, using the httr package. What the body would look like if it was in JSON format: {a:"1", b:"2", c:[{d:"3", e:"4"}]} What I tried with ...
0
votes
1answer
20 views

R Shiny Async Programming using GET function

The details on my R Installation and Packages are: OS macOS R v3.5.1 Future Package -! This is not available for the version of R installed on my system Am trying to fetch json data using API call ...
0
votes
0answers
19 views

httr POST to Microsoft

I am trying to send a post request to Microsoft in order to get a token to access Sharepoint using REST api, like explained here. library(httr) body <- '<s:Envelope xmlns:s="http://www.w3....
0
votes
0answers
9 views

how to use the function POST in R httr through a socks5 proxy

I am looking for a way to use POST with socks5 proxy. Which parameter will help? If not, are there some other function to do that? I know that the function getURL will do that with the method "GET". ...
0
votes
0answers
64 views

translating curl params to httr POST

I'd like to translate this (working from CLI) cURL call to httr::POST() so that will be easier to reuse: curl --data 'api_key=abc123' --data-urlencode 'event=[{"user_id":"u1", "event_type":"e_0224"}]'...
0
votes
1answer
50 views

R: sentiment analysis using Azure Cognitive Service Text API and HTTR package

I have problem with connection to the Azure Cognitive Service Text API (here is documentation:) using HTTR. library(httr) library("XML") api_url <- 'https://westcentralus.api.cognitive.microsoft....
0
votes
0answers
33 views

How POST in HTTR works with multiple header fields?

I am getting 403 error when using the POST function from the httr library. Loading the Json here abc <- '{ "internalId": "RAttribute", "description": { "language": "en", "short": "R Attribute", "...
0
votes
1answer
8 views

R: Retrieving answer from Azure FaceRecognition service using POST() httr

I want to connect with FACE API from Microsoft Azure https://westus.dev.cognitive.microsoft.com/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236 I do not know how to ...
0
votes
1answer
21 views

R: Httr package - connection with API, Error 1200: description“ : ”__all__ : img or url parameter is needed

I am very newbie in HTTR and connection with API by R. I cannot connect with F.A.C.E API (documentation: https://face-api.sightcorp.com/dev-documentation/) library(httr) library("XML") library("...
0
votes
0answers
17 views

Custom Error Capturing for an API in Plumber R

I have a function which I am executing using plumber as an api. I am trying to define custom error based on Status Code return by API call. I know, it can be achieved by using get(url) from httr ...
0
votes
0answers
25 views

how to process the httr response whose content-type is text/html?

I am trying the httr package (R) to use the API of GEPIA website(http://gepia.cancer-pku.cn/api.html). But I am stucked with how to extract the content from the response content (I want to extract the ...
0
votes
2answers
61 views

Deleting all tags on an Azure resource/resgroup via REST

According to the Docs, I can update the tags on a resource group or resource by making a PATCH request and setting the tags field in the body. This works for setting one or more tags, or deleting one ...
0
votes
0answers
101 views

R connection with API: Error in curl::curl_fetch_memory(url, handle = handle) : Failed to connect to localhost port 8080: Connection refused

I want to connect with F.A.C.E. API. I created free trial, obtained API key... however I cannot connect with API. I have almost no experience with connection with API by R, so I am looking for an ...
0
votes
0answers
50 views

rvest/httr performance when scraping many dynamic pages

I've seen a number of questions related to using rvest and httr to scrape data from dynamic web pages in R; however, the issue I face is related to speed/performance when scraping hundreds of pages. ...
0
votes
0answers
27 views

rvest package doesn't recognize the form

I wanted to scrap some data from following website: http://predstecajnenagodbe.fina.hr/pn-public-web/predmet/search but when I tried to use rvest: library(rvest) session <- html_session("http://...
1
vote
1answer
31 views

rvest - remove paragraphs from unwanted text

I would like to remove lots of paragraphs from the output of rvest code below library(rvest) link <- 'https://www.duedil.com/company/gb/02666908/yorwaste-limited/financials' doc <- ...
1
vote
0answers
185 views

Instagram API in R - Deprecated - Need to use graph.facebook.com

I am simply looking to get the follower count for specific users on instagram. I have been spending several hours looking into this and here are my findings: Instagram's API has been deprecated ...
0
votes
0answers
39 views

Twitter API in R - Follower Count by Geo

I am using the twitteR package in R to extract the followerCount for twitter handles. Is there a way to answer the question - How many followers for this twitter handle are US based? Below is my ...
0
votes
0answers
17 views

Is there a GET [R] (httr pkg) method for getting pretty print layout for .json?

I am successful in my pull of multiple .json files from a site (internal company). To get in .json format, I have to specify through the URL call (e.g. 'renderasJSON=TRUE'). As I said, the loop works ...
3
votes
1answer
88 views

R httr GET request - connection time-out

I am trying to download programmatically files like this from an ftp. The home page provides openly username ("fire") and password ("burnt") and I can download the files no problem from browser. When ...
0
votes
0answers
21 views

why Error in Request is not true happens in jump_to() method in R?

I am trying to log in and download the CSV file using httr and rvest package. the following is a script to download: url <- "https://lgloz050.lss.emc.com:58443/APG/" dn_url <- "https://lgloz050....
0
votes
0answers
14 views

How to avoid repeated login using HTTR in R language?

If I run the following code once it is displaying the correct result. library(data.table) library(jsonlite) library(httr) library(properties) library(futile.logger) library(crayon) library(XML) ...
1
vote
0answers
55 views

GET in for loop needs to be faster (httr) in R

I need to write a R script which sends at the end a huge amount of get requests to a server. Each row of my data frame contains several information. The final column "url" builds http requests in each ...
0
votes
0answers
28 views

R - Help me understand why my curl POST is not working in httr - status 400

My problem is fairly straight forward, but since I am not an IT guy I can't manage to know what is wrong. The fact of the matter is that if I use this following call I receive a status 200 and the ...
0
votes
1answer
50 views

httr::content throws error when supplying a variable as the request object

I am trying to get a list of Jira tickets that were opened from anyone within an organization. I have a list of user IDs but there are nearly 1400 people in this organization. Since there are this ...
0
votes
1answer
36 views

Using R to Scrape discogs

I use the following in my attempt to get a list of album release from Hank Mobley, a Blue Note jazz musician: library(magrittr);library(httr) releasesHM<-httr::GET("https://api.discogs.com/artists/...
0
votes
0answers
16 views

update html session R

I am trying to update html session and move to the second page in website, but i get an error: Navigating to javascript:__doPostBack('ctl00$ContentPlaceHolder1$UCNested$grdRTAList','Page$2') Error in ...
1
vote
0answers
13 views

Direct Authentication Issue In Console With ROAuth & Twitter

Hi, I am trying to connect my twitter with R studio and ROauth. However when I try using direct authentication I experience the following issue [1] "Using direct authentication" Use a local file ('....
2
votes
1answer
59 views

POST a form using R and httr

I try to automaticaly export the data from the csv link of this website https://www.finanssivalvonta.fi/en/capital-markets/issuers-and-investors/Managers-transactions/shortselling/ using R and the ...
2
votes
1answer
35 views

Submitting an explicitly NULL parameter via httr

Is there a way to submit NULL as a JSON parameter via httr? When I do httr::POST("https://httpbin.org/post", body = list(a = 1, b = NULL), httr::verbose(), encode ="json”), I see in the output that ...
0
votes
0answers
42 views

Complete a form in R and download Excel

I know that some of you have done similar questions but I am not able to solve my particular issue and I really need help with my code. What I need to do is enter some data into this form: https://...
0
votes
0answers
167 views

R: Illegal or missing hexadecimal sequence in chunked-encoding

I am calling a web service using POST, the returned values are used in the cost function of the Genetic Algorithm. The algorithm runs in parallel mode. I get the following error: task 1 failed - "...

http://mssss.yulina-kosm.ru