web services - Timeout error when connecting to a particular webservice API from corporate network using R -
i trying connect webservices corporate network , facing problems.
i using following set of statements
library(httr)
swapiurl<-"http://swapi.co/api/planets/?search=alderaan"
alderaan <- get(swapiurl)
error in curl::curl_fetch_memory(url, handle = handle) :
couldn't connect server
i above error message.
i enabled proxy settings below
sys.setenv(http_proxy="http://aproxy.xxxxx.xx.xxxxxxx.net:8083")
and again run above command , works
alderaan <- get(swapiurl)
alderaan$status_code
[1] 200
however, when try connect using proxy settings commercial product company purchased, not able connect , getting timeout error.
entraderurl<-"https://ngcsi.contigohosting.com/entrader_dev/wcfservices/tradingservice.svc"
auth<-get(entraderurl,authenticate("username","password"),timeout(60))
error in curl::curl_fetch_memory(url, handle = handle) : timeout reached
when try same using non-corporate network , remove above proxy settings, able connect entrader.
auth<-get(entraderurl,authenticate("username","password"),timeout(60))
auth$status_code
[1] 200
i using windows 7 laptop , r studio version 1.0.136 , r version 3.3.3.
i not sure missing here. appreciated.
let's include line well
sys.setenv(https_proxy="http://aproxy.xxxxx.xx.xxxxxxx.net:8083")
hope helps!
Comments
Post a Comment