Help Using LibCurl

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)


On Sep 4, 10:58 am, [email protected] wrote:

@headers = curl_getinfo(@curl)


Is there a reason why you can’t use open-uri?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs