twingly / twingly-http

Robust HTTP client
https://rubygems.org/gems/twingly-http
MIT License
0 stars 1 forks source link

Twingly::HTTP

GitHub Build Status

Robust HTTP client, tailored by Twingly.

Getting Started

Install the gem:

gem install twingly-http

Example "one-liner" usage:

ruby -rlogger -rtwingly/http -e '\
    logger = Logger.new($stdout); logger.level = :INFO; \
    puts Twingly::HTTP::Client.new(logger: logger, \
    base_user_agent: "").get("http://example.org").status'

Example irb usage:

irb -rlogger -rtwingly/http
logger = Logger.new($stdout); logger.level = :INFO
client = Twingly::HTTP::Client.new(logger: logger, base_user_agent: "")
client.get("http://example.org").status

Tests

The tests require Toxiproxy

docker-compose up

Run tests with

bundle exec rake

Release workflow