lib/faraday/request.rb in faraday-0.8.0.rc2 vs lib/faraday/request.rb in faraday-0.8.0
- old
+ new
@@ -13,21 +13,23 @@
extend AutoloadHelper
extend MiddlewareRegistry
autoload_all 'faraday/request',
:UrlEncoded => 'url_encoded',
- :Multipart => 'multipart',
- :Retry => 'retry',
- :Timeout => 'timeout',
+ :Multipart => 'multipart',
+ :Retry => 'retry',
+ :Timeout => 'timeout',
+ :Authorization => 'authorization',
:BasicAuthentication => 'basic_authentication',
:TokenAuthentication => 'token_authentication'
register_middleware \
:url_encoded => :UrlEncoded,
- :multipart => :Multipart,
- :retry => :Retry,
- :basic_auth => :BasicAuthentication,
- :token_auth => :TokenAuthentication
+ :multipart => :Multipart,
+ :retry => :Retry,
+ :authorization => :Authorization,
+ :basic_auth => :BasicAuthentication,
+ :token_auth => :TokenAuthentication
def self.create(request_method)
new(request_method).tap do |request|
yield request if block_given?
end