5

現在、この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)

これにより、コマンドプロンプトでこれを入力すると得られるものが得られます...

curl -H "Content-Type: application/json" -d '{"text": "its really cold in here"}' -X POST http://urlhere

RCurl postForm(uri="http://urlhere", with different options...) を使用してみましたが、結果はありませんでした。この方法で行う方が速いですか、それとも理解する価値がありますか?

ありがとう

4

0 に答える 0