Q:

Rails Use Net/Http like curl

curl -F 'access_token=...' \
 -F 'message=Check out this funny article' \
 https://graph.facebook.com/me/feed
I've written this in curl with php before, but how would I do this in rails? Is there such thing as curl in rails?

A:

You can use the Net:HTTP thats come with rails 
For example , in your controller you can use something like this  : 
uri = URI.parse("https://graph.facebook.com/me/feed")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(uri.request_uri)
response = http.request(request)
# and whatever you want to do with the response var

Update
Remember that you could write this code in a model, or module.

