Skip to content

Commit

Permalink
Add alias with legacy name to gemified middleware (#1372)
Browse files Browse the repository at this point in the history
  • Loading branch information
iMacTia authored Jan 6, 2022
1 parent 554930c commit 3f127bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 3 additions & 1 deletion lib/faraday.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@
require 'faraday/error'
require 'faraday/request/url_encoded' # needed by multipart

# External Middleware gems
# External Middleware gems and their aliases
require 'faraday/multipart'
require 'faraday/retry'
Faraday::Request::Multipart = Faraday::Multipart::Middleware
Faraday::Request::Retry = Faraday::Retry::Middleware

# External Adapters gems
unless defined?(JRUBY_VERSION)
Expand Down
2 changes: 0 additions & 2 deletions lib/faraday/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ class Request < Struct.new(

register_middleware File.expand_path('request', __dir__),
url_encoded: [:UrlEncoded, 'url_encoded'],
multipart: [:Multipart, 'multipart'],
retry: [:Retry, 'retry'],
authorization: [:Authorization, 'authorization'],
basic_auth: [
:BasicAuthentication,
Expand Down

0 comments on commit 3f127bb

Please sign in to comment.