Help Using LibCurl

C

clarkocb

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
 
M

Mark Thomas

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?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top