Get site content over SSL with httr in R
I'm trying to fetch a JSON array from my server using the HTTP POST method in R. I've tried using both the POST function from httr and the getURL function from RCurl but both return errors. cafile <- system.file("CurlSSL", "cacert.pem", package = "RCurl") url <- "https://example.com/query/getData.php" POST(url,body=NULL) POST(url,body=NULL,config(cainfo=cafile)) getURL(url) getURL(url,cainfo=cafile) The error given by the POST function is (for both calls): Error in curl::curl_fetch_memory(url, handle = handle) : SSL peer certificate or SSH remote key was not OK The error given by the getURL