如何在cygwin terminal works(windows 8)上使用R,cURL命令获取API令牌

如何在cygwin terminal works(windows 8)上使用R,cURL命令获取API令牌,r,post,curl,basic-authentication,httr,R,Post,Curl,Basic Authentication,Httr,我能够在windows上的cygwin终端上使用curl命令获取API身份验证令牌 curl -X POST -d '{"username":"usenamexxx","password":"passwordxxx"}' https://demo.website.com/api/token 输出看起来像 {"token":"87JrlYIOQa6g6aXciJOxNUK81","_links":{"DiscoveryPage":{"title":"Available API Resources

我能够在windows上的cygwin终端上使用curl命令获取API身份验证令牌

curl -X POST -d '{"username":"usenamexxx","password":"passwordxxx"}' https://demo.website.com/api/token
输出看起来像

{"token":"87JrlYIOQa6g6aXciJOxNUK81","_links":{"DiscoveryPage":{"title":"Available API Resources","href":"https://demo.website.com/api"}}}
但是当我使用httr包从R尝试POST命令时,我得到了以下错误

library(httr)
tokenURL <- "https://demo.website.com/api/token"
s <- POST(tokenURL,body = list(username = "usenamexxx",password = "passwordxxx" ))
Error in function (type, msg, asError = TRUE)  : 
  Unknown SSL protocol error in connection to demo.website.com:443 
库(httr)
令牌URL可能相关: