与此等效的RCurl。。。

与此等效的RCurl。。。,r,rcurl,R,Rcurl,我目前正在使用这个R代码在Ubuntu机器上完成我想做的事情 jsontext <- '{"text": "its really cold in here"}' a <- paste('curl -H "Content-Type: application/json" -d ', " '", jsontext, "'", ' -X POST http://urlhere', sep="") response <- system(a) 我尝试过使用RCurl postForm(u

我目前正在使用这个R代码在Ubuntu机器上完成我想做的事情

jsontext <- '{"text": "its really cold in here"}'
a <- paste('curl -H "Content-Type: application/json" -d ', " '", jsontext, "'", ' -X POST http://urlhere', sep="")
response <- system(a)
我尝试过使用RCurl postForm(uri=”http://urlhere“,有各种选择…),但没有任何结果。这样做是更快还是值得一试


谢谢

我肯定你收到了一条错误消息或是什么,这确实是一个结果。如果没有,您可能需要查看
basicHeaderGatherer
并检查HTTP头。
curl -H "Content-Type: application/json" -d '{"text": "its really cold in here"}' -X POST http://urlhere