how to use curl on ruby on rails? Like this one
curl -d \'params1[name]=name¶ms2[email]\' \'http://mydomain.com/file.json\'
Here is a curl to ruby's net/http converter: https://jhawthorn.github.io/curl-to-ruby/
For instance, a curl -v www.google.com
command is equivalent in Ruby to:
require 'net/http'
require 'uri'
uri = URI.parse("http://www.google.com")
response = Net::HTTP.get_response(uri)
# response.code
# response.body