Skip to content

ably-forks/em-http-request

 
 

Repository files navigation

EM-HTTP-Request

Gem Version GitHub Workflow Status

Note: This is Ably’s fork of https://github.com/igrigorik/em-http-request. We created it to fix a TLS-related issue in the original library, which seems to be no longer maintained. This fork exists to be used inside our ably-ruby SDK. We have only made the changes required to be able to distribute this library as a separate gem; in particular, most of the documentation still refers to the original library. The constant names used in this fork have been changed so as not to clash with the original library.

Async (EventMachine) HTTP client, with support for:

  • Asynchronous HTTP API for single & parallel request execution
  • Keep-Alive and HTTP pipelining support
  • Auto-follow 3xx redirects with max depth
  • Automatic gzip & deflate decoding
  • Streaming response processing
  • Streaming file uploads
  • HTTP proxy and SOCKS5 support
  • Basic Auth & OAuth
  • Connection-level & global middleware support
  • HTTP parser via http_parser.rb
  • Works wherever EventMachine runs: Rubinius, JRuby, MRI

Getting started

gem install ably-em-http-request

Extensions

Several higher-order Ruby projects have incorporated em-http and other Ruby HTTP clients:

  • EM-Synchrony - Collection of convenience classes and primitives to help untangle evented code (Ruby 1.9 + Fibers).
  • Rack-Client - Use Rack API for server, test, and client side. Supports Rack middleware!
  • Faraday - Modular HTTP client library using middleware heavily inspired by Rack.

Testing

Other libraries & applications using EM-HTTP

  • VMWare CloudFoundry - The open platform-as-a-service project
  • PubSubHubbub - Asynchronous PubSubHubbub ruby client
  • em-net-http - Monkeypatching Net::HTTP to play ball with EventMachine
  • chirpstream - EM client for Twitters Chirpstream API
  • rsolr-async - An asynchronus connection adapter for RSolr
  • Firering - Eventmachine powered Campfire API
  • RDaneel - Ruby crawler which respects robots.txt
  • em-eventsource - EventSource client for EventMachine
  • and many others.. drop me a link if you want yours included!

Release process

(Added for Ably’s fork.)

This library uses semantic versioning. For each release, the following needs to be done:

  • Update the version number in version.rb and commit the change.
  • Update Changelog.md with the changes since the previous release.
  • Create and push a tag named by prefixing the version number with the letter v; e.g. git tag v1.1.8 && git push origin v1.1.8.
  • Visit https://github.com/ably-forks/em-http-request/tags and Add release notes for the release including links to the changelog entry.
  • Run rake release to publish the gem to Rubygems.

License

(MIT License) - Copyright (c) 2011 Ilya Grigorik

About

Asynchronous HTTP Client (EventMachine + Ruby)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%