Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Help Using LibCurl

Reply
Thread Tools

Help Using LibCurl

 
 
clarkocb@gmail.com
Guest
Posts: n/a
 
      09-04-2008
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
 
Reply With Quote
 
 
 
 
Mark Thomas
Guest
Posts: n/a
 
      09-08-2008
On Sep 4, 10:58*am, (E-Mail Removed) 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?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
telnet from c application using libcurl ?? Jake C Programming 3 02-24-2008 02:38 AM
Post data to http server using libcurl Raj Python 0 11-09-2006 12:08 PM
Post data using the libcurl Raj Python 0 11-09-2006 12:06 PM
Post data using the libcurl Raj Python 0 11-09-2006 12:06 PM
Help getting started with Pycurl / libcurl ? gjzusenet@gmail.com Python 0 02-27-2006 11:58 AM



Advertisments