Help Using LibCurl

Discussion in 'Ruby' started by clarkocb@gmail.com, Sep 4, 2008.

  1. Guest

    HI,
    I'm new to ruby and have to use the libcurl library but my code don't
    seem to work.

    @curl = curl_init()
    curl_setopt(@curl, CURLOPT_RETURNTRANSFER, 1)

    curl_setopt(@curl, CURLOPT_URL, 'url');
    curl_setopt(@curl, CURLOPT_POST, 0)
    @result = curl_exec(@curl)
    @headers = curl_getinfo(@curl)

    Thx
    , Sep 4, 2008
    #1
    1. Advertising

  2. Mark Thomas Guest

    On Sep 4, 10:58 am, wrote:
    > HI,
    > I'm new to ruby and have to use the libcurl library but my code don't
    > seem to work.
    >
    > @curl = curl_init()
    > curl_setopt(@curl, CURLOPT_RETURNTRANSFER, 1)
    >
    > curl_setopt(@curl, CURLOPT_URL, 'url');
    > curl_setopt(@curl, CURLOPT_POST, 0)
    > @result = curl_exec(@curl)
    > @headers = curl_getinfo(@curl)
    >
    > Thx


    Is there a reason why you can't use open-uri?
    Mark Thomas, Sep 8, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    465
  2. Raj

    Post data using the libcurl

    Raj, Nov 9, 2006, in forum: Python
    Replies:
    0
    Views:
    325
  3. Raj

    Post data using the libcurl

    Raj, Nov 9, 2006, in forum: Python
    Replies:
    0
    Views:
    277
  4. Raj
    Replies:
    0
    Views:
    1,124
  5. Jake
    Replies:
    3
    Views:
    746
    Richard
    Feb 24, 2008
Loading...

Share This Page