HTTPI provides a common interface for Ruby's HTTP libraries.
HTTPI is available through Rubygems and can be installed via:
$ gem install httpi
require "httpi" # create a request object request = HTTPI::Request.new request.url = "http://example.com" # and pass it to a request method HTTPI.get(request) # use a specific adapter per request HTTPI.get(request, :curb) # or specify a global adapter to use HTTPI.adapter = :httpclient # and execute arbitary requests HTTPI.request(:custom, request)
Continue reading at httpirb.com