I am trying to access data using httr library from server which expects certificate based authentication. I have certificate (cert.pem), key file (key.pem) and root certificate (caroot.pem)
Following curl works.
curl -H "userName:sriharsha@rpc.com" --cert cert.pem --key certkey.key --cacert caroot.pem https://api.somedomain.com/api/v1/timeseries/klog?limit=1
How can specify certkey.key and caroot.pem to httr GET request. I am trying with following R command but couldn't find option to specify cert key and caroot.
cafile=????
r<-GET("https://api.somedomain.com/api/v1/timeseries/klog", query = list(limit = 1), add_headers("userName"= "sriharsha@rpc.com"), config(cainfo = cafile, ssl_verifypeer=FALSE), verbose())
Thus I am looking for equivalent options of httr for (--cert, --key and --cacert) of curl.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…