Skip to content

RCurl: authentication when posting forms

1 message · Valerie Obenchain

#
Hi Duncan,

Yes, unfortunately my filter must have eaten your first response to my 
parseHTTPHeader question. Thanks for responding to it again here on the 
list and for the more efficient paste tip.

Below is a getURI call that returns a "not found" message. It is a 
publicly available web site and requires no authentication.

myurl <-  
"https://www.labkey.org/query/home/Study/demo/selectRows.api?schemaName=list&query.queryName=HIV%20Test%20Results"
reader <- basicTextGatherer()
header <- basicTextGatherer()
myopts <- curlOptions(writefunction=reader$update, 
headerfunction=header$update, ssl.verifyhost=FALSE, 
ssl.verifypeer=FALSE, followlocation=TRUE)
handle <- getCurlHandle()
mydata <- getURI(myurl, .opts=myopts, curl=handle)

The correct url that gives an "ok" message is
myurl <-  
"https://www.labkey.org/query/home/Study/demo/selectRows.api?schemaName=study&query.queryName=HIV%20Test%20Results"


Take care,
Valerie
Duncan Temple Lang wrote: