VERSION | = | "0.8.0" |
Timer | = | defined?(::SystemTimer) ? ::SystemTimer : ::Timeout |
UploadIO | = | ::UploadIO |
Parts | = | ::Parts |
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.