Skip to content
/ httpi Public
forked from savonrb/httpi

Common interface for Ruby's HTTP clients

License

Notifications You must be signed in to change notification settings

varvet/httpi

 
 

Repository files navigation

HTTPI

A common interface for Ruby's HTTP libraries.

Documentation

Development

Installation

HTTPI is available through Rubygems and can be installed via:

$ gem install httpi

or add it to your Gemfile like this:

gem 'httpi', '~> 3.0.0'

Usage example

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)

SOCKS Proxy Support

To use the the SOCKS proxy support, please add the socksify gem to your gemfile, and add the following code:

require 'socksify'
require 'socksify/http'

to your project.

Documentation

Continue reading at https://www.rubydoc.info/gems/httpi

About

Common interface for Ruby's HTTP clients

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%