Skip to content

Instantly share code, notes, and snippets.

@javiervidal
Created December 18, 2009 11:28
Show Gist options
  • Save javiervidal/259452 to your computer and use it in GitHub Desktop.
Save javiervidal/259452 to your computer and use it in GitHub Desktop.
Script to make post requests
require 'rubygems'
require 'activesupport'
require 'net/http'
path = "/report_abuse"
params = {"abuse"=>{"title"=>"momo", "resource_type"=>"Post", "resource_id"=>"15", "referer"=>"/conversatio/blogs/8-blog-de-nurse1/posts/15-el-cua
derno-de-notas-del-capitn-de-la-copa-davis-albert-costa", "description"=>"momo"}}.to_param
http = Net::HTTP.new("localhost", 3000)
http.post(path, params)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment