Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
E

em-http-request

> 编程语言
Open source

Asynchronous HTTP Client (EventMachine + Ruby)

1.2K stars0 likes1 views
WebsiteGitHub

About

Asynchronous HTTP Client (EventMachine + Ruby)

EM-HTTP-Request

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 em-http-request
  • Introductory screencast
  • Issuing GET/POST/etc requests
  • Issuing parallel requests with Multi interface
  • Handling Redirects & Timeouts
  • Keep-Alive and HTTP Pipelining
  • Stream processing responses & uploads
  • Issuing requests through HTTP & SOCKS5 proxies
  • Basic Auth & OAuth
  • GZIP & Deflate decoding
  • EM-HTTP Middleware

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!
    • Example in action
  • Faraday - Modular HTTP client library using middleware heavily inspired by Rack.
    • Example in action

Testing

  • WebMock - Library for stubbing and setting expectations on HTTP requests in Ruby.
    • Example of using WebMock, VCR & EM-HTTP

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!

License

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

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Ruby

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言