Ashwin Kumar Sharma
2010-Mar-31 06:01 UTC
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 ¶meter=''#{}'' http://x.x.x.x/yyy/zzz.ext") or %x[curl -I -H ¶meter=''#{}'' 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. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
g_f
2010-Mar-31 06:53 UTC
Re: Passing parameters to a URL through curl in the application.
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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Ashwin Kumar Sharma
2010-Mar-31 07:51 UTC
Re: Passing parameters to a URL through curl in the application.
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.htmlThanks for your valuable suggestion, I will try it out. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.