<div>Hi All, </div><div>I want to post request for getting data from API via RCurl.</div><div><br></div><div>in Linux command line, I do it successfully:</div><div><br></div><div><font __editorwarp__="1" style="display: inline; font-size: 12px; font-family: 宋体; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; background-color: rgba(0, 0, 0, 0);"> dt = 'date+%y%m%d%H%M%S'</font></div><font __editorwarp__="1" style="display: inline; font-size: 12px; font-family: 宋体; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; background-color: rgba(0, 0, 0, 0);"><div style="display: block; font-size: 12px; font-family: 宋体; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; background-color: rgba(0, 0, 0, 0);"> home_ph = /data/test</div><div style="display: block; font-size: 12px; font-family: 宋体; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; background-color: rgba(0, 0, 0, 0);"> data_ph = /data/test/data</div><div style="display: block; font-size: 12px; font-family: 宋体; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; background-color: rgba(0, 0, 0, 0);"> urls = 183.60.7.39:9980</div><div style="display: block; font-size: 12px; font-family: 宋体; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; background-color: rgba(0, 0, 0, 0);"><span style="font-size: 9pt; line-height: 1.5;"> curl
$urls -H 'Connection: close' -o</span><span style="font-size: 9pt; line-height: 1.5;"> $data_ph/$1-$2-$dt.txt -u
user1:eb2e9a27392d4cfd3ce2d3f00bc18d7e --data @$home_ph/$1 --compressed</span></div></font><div><p class="MsoNormal" align="left" style="margin-left: 10pt;"><span lang="EN-US" style="font-size:9.0pt;font-family:宋体"><img src="cid:3107F60A@ED1DBA69.B2CB0356" modifysize="100%" diffpixels="25px" scalingmode="zoom" style="font-family: Verdana; font-size: 14px; line-height: 21px; width: 976px; height: 36px;"></span></p><p class="MsoNormal" align="left" style="margin-left: 10pt;"><font __editorwarp__="1" style="display: inline; font-size: 14px; font-family: Verdana; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; background-color: rgba(0, 0, 0, 0);">the post content as follows:</font></p><p class="MsoNormal" align="left" style="margin-left: 10pt;"><font __editorwarp__="1" style="display: inline; font-size: 12px; font-family: 宋体; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; background-color: rgba(0, 0, 0, 0);"> <?xml version="1.0" encoding="UTF-8"?></font></p><font __editorwarp__="1" style="display: inline; font-size: 12px; font-family: 宋体; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; background-color: rgba(0, 0, 0, 0);"><p class="MsoNormal" align="left" style="margin-left: 10pt; display: block; font-size: 12px; font-family: 宋体; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; background-color: rgba(0, 0, 0, 0);"> <kangaroo-request></p><p class="MsoNormal" align="left" style="margin-left: 10pt; display: block; font-size: 12px; font-family: 宋体; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; background-color: rgba(0, 0, 0, 0);"> <request></p><p class="MsoNormal" align="left" style="margin-left: 10pt; display: block; font-size: 12px; font-family: 宋体; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; background-color: rgba(0, 0, 0, 0);"> <sqlId>test_2</sqlId></p><p class="MsoNormal" align="left" style="margin-left: 10pt; display: block; font-size: 12px; font-family: 宋体; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; background-color: rgba(0, 0, 0, 0);"> <content-type>text/json</content-type></p><p class="MsoNormal" align="left" style="margin-left: 10pt; display: block; font-size: 12px; font-family: 宋体; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; background-color: rgba(0, 0, 0, 0);"> <startRow></startRow></p><p class="MsoNormal" align="left" style="margin-left: 10pt; display: block; font-size: 12px; font-family: 宋体; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; background-color: rgba(0, 0, 0, 0);"> <endRow></endRow></p><p class="MsoNormal" align="left" style="margin-left: 10pt; display: block; font-size: 12px; font-family: 宋体; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; background-color: rgba(0, 0, 0, 0);"> <alias>gds</alias></p><p class="MsoNormal" align="left" style="margin-left: 10pt; display: block; font-size: 12px; font-family: 宋体; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; background-color: rgba(0, 0, 0, 0);"> <params></params></p><p class="MsoNormal" align="left" style="margin-left: 10pt; display: block; font-size: 12px; font-family: 宋体; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; background-color: rgba(0, 0, 0, 0);"> </request></p><p class="MsoNormal" align="left" style="margin-left: 10pt; display: block; font-size: 12px; font-family: 宋体; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; background-color: rgba(0, 0, 0, 0);"> </kangaroo-request></p><p class="MsoNormal" align="left" style="margin-left: 10pt; display: block; font-size: 12px; font-family: 宋体; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; background-color: rgba(0, 0, 0, 0);"><br></p><p class="MsoNormal" align="left" style="margin-left: 10pt; display: block; font-size: 12px; font-family: 宋体; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; background-color: rgba(0, 0, 0, 0);"><br></p></font><p class="MsoNormal" align="left" style="margin-left: 10pt;"></p><p class="MsoNormal" align="left" style="margin-left: 10pt;"><font __editorwarp__="1" style="display: inline; font-size: 14px; font-family: Verdana; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; background-color: rgba(0, 0, 0, 0);">But I cannot code it with getURL() function in R.</font></p><p class="MsoNormal" align="left" style="margin-left: 10pt;"><font __editorwarp__="1" style="display: inline; font-size: 12px; font-family: 宋体; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; background-color: rgba(0, 0, 0, 0);"> >> sort(names(getCurlOptionsConstants()))</font></p><p class="MsoNormal" align="left" style="margin-left: 10pt;">Although I can get the list of options, <span style="line-height: 1.5; background-color: rgba(0, 0, 0, 0);">No further info about these options, </span></p><p class="MsoNormal" align="left" style="margin-left: 10pt;"><span style="line-height: 1.5;">no bridge between the options of getURL() and libCurl.</span></p><p class="MsoNormal" align="left" style="margin-left: 10pt;"><span style="line-height: 1.5;"><br></span></p><p class="MsoNormal" align="left" style="margin-left: 10pt;"><span style="line-height: 1.5;">Could anyone give me some advice for me to do the code with RCurl Library in R ?</span></p><p class="MsoNormal" align="left" style="margin-left: 10pt;"><span style="line-height: 1.5;">Any help is much appreciated. </span><span style="line-height: 1.5;">3x much.</span></p><p class="MsoNormal" align="left" style="margin-left: 10pt;"><span style="line-height: 1.5;"><br></span></p><p class="MsoNormal" align="left" style="margin-left: 10pt;"><br></p><p class="MsoNormal" align="left" style="margin-left: 10pt;"><font __editorwarp__="1" style="display: inline; font-size: 14px; font-family: Verdana; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; background-color: rgba(0, 0, 0, 0);"><br></font></p><p class="MsoNormal" align="left" style="margin-left: 10pt;"><span lang="EN-US" style="font-size:9.0pt;font-family:宋体"><br></span></p><p class="MsoNormal" align="left" style="margin-left: 10pt;"><span lang="EN-US" style="font-size:9.0pt;font-family:宋体"><br></span></p></div>