[R-SIG-Finance] RCurl post request implement problem.

Joshua Ulrich josh.m.ulrich at gmail.com
Thu Sep 24 14:00:11 CEST 2015


Since this is not related to finance, you'll likely get better
response if you post to R-help instead.

On Thu, Sep 24, 2015 at 5:08 AM, Arbor wang <arborwang at qq.com> wrote:
>
> Hi All,
> I want to post request for getting data from API  via RCurl.
>
> in Linux command line, I do it successfully:
>
>  dt = 'date+%y%m%d%H%M%S'
>  home_ph = /data/test
>  data_ph = /data/test/data
>  urls = 183.60.7.39:9980
>  curl $urls -H 'Connection: close' -o $data_ph/$1-$2-$dt.txt -u user1:eb2e9a27392d4cfd3ce2d3f00bc18d7e --data @$home_ph/$1 --compressed
>
> the post content as follows:
>
>  <?xml version="1.0" encoding="UTF-8"?>
>
>  <kangaroo-request>
>
>  <request>
>
>  <sqlId>test_2</sqlId>
>
>  <content-type>text/json</content-type>
>
>  <startRow></startRow>
>
>  <endRow></endRow>
>
>  <alias>gds</alias>
>
>  <params></params>
>
>  </request>
>
>  </kangaroo-request>
>
>
>
> But I cannot code it with getURL() function in R.
>
>   >> sort(names(getCurlOptionsConstants()))
>
> Although I can get the list of options, No further info about these options,
>
> no bridge between the options of getURL() and libCurl.
>
>
> Could anyone give me some advice for me to do the code with RCurl Library in R ?
>
> Any help is much appreciated. 3x much.
>
>
>
>
>
>
>
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.




-- 
Joshua Ulrich  |  about.me/joshuaulrich
FOSS Trading  |  www.fosstrading.com



More information about the R-SIG-Finance mailing list