Timeout when using httr:POST()

Asked

Viewed 73 times

5

Expensive,

I’m trying to hold a conference of records at CREA-RS website, but every time this giving the following error:

Error in curl::curl_fetch_memory(url, handle = handle) : 
  Timeout was reached

Does anyone know what might be going on? R is connecting normal to the internet. Follow the code I’m trying to run:

b2 <- "http://apolo.crea-rs.org.br/apoloaplsrv01/servlet/org.crears.apolo.prod.hsel_profis_consulta_site?,0"
r <- POST(b2, encode = 'form', body = list("_PRF_NROCPF"  = 12345678910))
  • Here ran normal... You made many queries? Did your IP was blocked?

  • It gave error already in the first one, and by the browser I can enter the site

  • Do you have any firewalls? Other webscrapping codes work there?

  • Yes, they work. readLines(b2) works also.

1 answer

3


The httr package, for some reason, does not use the computer’s proxy configuration. To resolve, you need to load the package devtools and call the following function:

set_config(use_proxy(url="IP/URL DA PROXY", port=PORTA DA PROXY))

Browser other questions tagged

You are not signed in. Login or sign up in order to post.