Passing parameters to a URL through curl in the application.

Hello all,

          I need few suggestions on how to pass the parameters to a URL
through curl. Currently I can do that using system() and %x[] through
which I could give the curl command. But since these two executes the
curl as a shell command I don't want to use these to do that. For
example I'm using it in this way in the controller code.

system("curl -I -H &parameter='#{}' http://x.x.x.x/yyy/zzz.ext")
or
%x[curl -I -H &parameter='#{}' http://x.x.x.x/yyy/zzz.ext ]

Is there any plug-ins or gems in rails which I can use to send the
parameters using the curl and not executed as a shell command? If any
please suggest. Now I'm using system() or %x[] which I want to evaluate
because it executes the content in that as a shell command.

Thanks in advance and Regards.

Search for ruby + libcurl for other suggestions, but patron might do
what you want.

http://github.com/toland/patron
http://www.rubyinside.com/patron-a-simpler-ruby-http-client-2067.html

G_ F_ wrote:

Search for ruby + libcurl for other suggestions, but patron might do
what you want.

http://github.com/toland/patron
http://www.rubyinside.com/patron-a-simpler-ruby-http-client-2067.html

Thanks for your valuable suggestion, I will try it out.