this is not a HTTP request lib like the ones you see around, it is REAL BROWSAH!
Ruby
Pull request Compare This branch is 2 commits ahead, 15 commits behind abril:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
docs
lib
script
test
.gitignore
GEM_VERSION
Gemfile
LICENSE
README.md
Rakefile
browsah.gemspec

README.md

It's a REAL BROWSAH!!!1!

Unlike other HTTP client libraries, browsah aims to be a true browser.

Sample Code

Simple POST/GET:

require 'browsah'
require 'json'

headers = { 'Content-Type' => 'application/json' }
body    = { "longUrl" => "http://engineering.abril.com.br" }.to_json
bw      = Browsah.new('https://www.googleapis.com')

bw.post '/urlshortener/v1/url', :body => body, :headers => headers do |r|
  r.on(200) do
    parsed = JSON.parse(r.body)
    jj parsed
  end
end

bw.get '/urlshortener/v1/url?shortUrl=http://goo.gl/TT1LT' do |r|
  r.on(200) do
    parsed = JSON.parse(r.body)
    jj parsed
  end
end

License

browsah is licensed under the BSD License.

See LICENSE file for details.