getURL with user,pwd和AppID

时间:2017-06-19 11:05:53

标签: r rcurl

我试图提出以下请求:

library("RCurl")

getURL("https://api.example.com/resource",
userpwd ="username:password",param="ApplicationID")

但我有这个错误:

The required parameter 'Username' was not found.

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

试试这个:

opts = curlOptions(userpwd = "user:swd", param= "AppID") 
getURL("url",.opts=opts)