Sha256: 3f362f75b836120a4866983450db6390fb4d0ccdd95ff4ee84e18de18f1659b8
Contents?: true
Size: 1.47 KB
Versions: 1
Compression:
Stored size: 1.47 KB
Contents
# frozen_string_literal: true require_relative 'verbose_ws_wrapper/middleware' require_relative 'verbose_ws_wrapper/version' module Faraday # This will be your middleware main module, though the actual middleware implementation will go # into Faraday::VerboseWsWrapper::Middleware for the correct namespacing. module VerboseWsWrapper # Faraday allows you to register your middleware for easier configuration. # This step is totally optional, but it basically allows users to use a # custom symbol (in this case, `:verbose_ws_wrapper`), to use your middleware in their connections. # After calling this line, the following are both valid ways to set the middleware in a connection: # * conn.use Faraday::VerboseWsWrapper::Middleware # * conn.use :verbose_ws_wrapper # Without this line, only the former method is valid. Faraday::Middleware.register_middleware(verbose_ws_wrapper: Faraday::VerboseWsWrapper::Middleware) # Alternatively, you can register your middleware under Faraday::Request or Faraday::Response. # This will allow to load your middleware using the `request` or `response` methods respectively. # # Load middleware with conn.request :verbose_ws_wrapper # Faraday::Request.register_middleware(verbose_ws_wrapper: Faraday::VerboseWsWrapper::Middleware) # # Load middleware with conn.response :verbose_ws_wrapper # Faraday::Response.register_middleware(verbose_ws_wrapper: Faraday::VerboseWsWrapper::Middleware) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
faraday-verbose_ws_wrapper-0.1.1 | lib/faraday/verbose_ws_wrapper.rb |