Continuing the discussion from httr GET hanging with no response:
Was there any understanding on this issue?
It works in python but times out in R.
R chunk in Rstudio:
library(httr) resp <- GET( url = "https://www.cmegroup.com/", user_agent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36'), timeout(10), verbose() ) print(resp)
Times out
Timeout value was also increased but no success.
Error in curl::curl_fetch_memory(url, handle = handle) :
Timeout was reached: [www.cmegroup.com] Operation timed out after 10005 milliseconds with 0 bytes received
This is the python chunk in Rstudio:
import requests as r resp = r.get( "https://www.cmegroup.com/", headers = {'user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36'}, timeout = 10 ) print(len(resp.content))
Success:
579810