Simple wrapper for Net:HTTP
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
.gitignore
LICENSE
README.md
easy_http.gemspect

README.md

Basic Usage

Simple request:

session = EasyHTTP::Session.new "https://www.google.com/", { :ssl => true }
session.get "/"

Additional config:

session = EasyHTTP::Session.new "https://www.google.com/", {
  :ssl => true,
  :port => 443,
  :username => 'http_auth_user',
  :password => 'http_auth_pass',
  :read_timeout => 1000,
  :debug => $sdtout,
  :insecure => false,
  :max_redirs => 10
  }

Store session cookies

session = EasyHTTP::Session.new "https://www.google.com/", { :ssl => true }
session.session_cookies

Enable body encode (only ruby >= 1.9.2):

Encoding.default_internal = 'UTF-8'

Installation

~$ sudo gem install easy_http

Author

License

EasyHTTP uses the MIT license, check LICENSE file.