Rely on autoloading instead of explicit require; helps avoid the "already initialized constant" warning on Ruby 1.8.7 when NetHttp is refereced below. require ‘faraday/adapter/net_http‘
UploadIO | = | ::UploadIO |
Parts | = | ::Parts |
VERSION | = | "0.8.9" |
Timer | = | SystemTimer |
Timer | = | Timeout |
require_libs | -> | require_lib |
default_adapter | [RW] | |
default_connection | [W] | |
lib_path | [RW] | |
root_path | [RW] |
Public: register middleware classes under a short name.
type - A Symbol specifying the kind of middleware (default: :middleware) mapping - A Hash mapping Symbol keys to classes. Classes can be expressed
as fully qualified constant, or a Proc that will be lazily called to return the former.
Examples
Faraday.register_middleware :aloha => MyModule::Aloha Faraday.register_middleware :response, :boom => MyModule::Boom # shortcuts are now available in Builder: builder.use :aloha builder.response :boom
Returns nothing.