# ![http.rb](https://raw.github.com/httprb/http.rb/main/logo.png)
[![Gem Version][gem-image]][gem-link]
[![MIT licensed][license-image]][license-link]
[![Build Status][build-image]][build-link]
[![Code Climate][codeclimate-image]][codeclimate-link]
[Documentation]
## About
HTTP (The Gem! a.k.a. http.rb) is an easy-to-use client library for making requests
from Ruby. It uses a simple method chaining system for building requests, similar to
Python's [Requests].
Under the hood, http.rb uses the [llhttp] parser, a fast HTTP parsing native extension.
This library isn't just yet another wrapper around `Net::HTTP`. It implements the HTTP
protocol natively and outsources the parsing to native extensions.
### Why http.rb?
- **Clean API**: http.rb offers an easy-to-use API that should be a
breath of fresh air after using something like Net::HTTP.
- **Maturity**: http.rb is one of the most mature Ruby HTTP clients, supporting
features like persistent connections and fine-grained timeouts.
- **Performance**: using native parsers and a clean, lightweight implementation,
http.rb achieves high performance while implementing HTTP in Ruby instead of C.
## Installation
Add this line to your application's Gemfile:
```ruby
gem "http"
```
And then execute:
```bash
$ bundle
```
Or install it yourself as:
```bash
$ gem install http
```
Inside of your Ruby program do:
```ruby
require "http"
```
...to pull it in as a dependency.
## Documentation
[Please see the http.rb wiki][documentation]
for more detailed documentation and usage notes.
The following API documentation is also available:
- [YARD API documentation](https://www.rubydoc.info/github/httprb/http)
- [Chainable module (all chainable methods)](https://www.rubydoc.info/github/httprb/http/HTTP/Chainable)
### Basic Usage
Here's some simple examples to get you started:
```ruby
>> HTTP.get("https://github.com").to_s
=> "\n\n\n\n\n