Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #7 from ivmaykov/master

Fixed a compatibility issue w/ Faraday using Net::HTTP adapter.

Faraday creates a Net::HTTPGenericRequest directly (at,
which does not have a ::METHOD constant defined, so we have to use
#method to get the HTTP method name.
  • Loading branch information...
commit bd9f07e3abb1353d94a888d0c9df1ed80453ba9d 2 parents 662210f + 7979cf3
James Fairbairn authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/em-net-http.rb
3  lib/em-net-http.rb
@@ -135,7 +135,8 @@ def request(req, body = nil, &block)
headers['content-type'] ||= "application/x-www-form-urlencoded"
t0 =
- httpreq =, opts)
+ request_method = (req.respond_to?(:method) ? req.method : req.class::METHOD).downcase.to_sym
+ httpreq =, opts)
Please sign in to comment.
Something went wrong with that request. Please try again.