Class: Restforce::Middleware
- Inherits:
-
Faraday::Middleware
- Object
- Faraday::Middleware
- Restforce::Middleware
- Defined in:
- lib/restforce/middleware.rb,
lib/restforce/middleware/authentication/jwt_bearer.rb,
lib/restforce/middleware/authentication/client_credential.rb
Overview
Base class that all middleware can extend. Provides some convenient helper functions.
Direct Known Subclasses
Authentication, Authorization, CustomHeaders, Gzip, InstanceURL, Mashify
Defined Under Namespace
Classes: Authentication, Authorization, Caching, CustomHeaders, Gzip, InstanceURL, JsonRequest, JsonResponse, Logger, Mashify, Multipart, RaiseError
Instance Method Summary collapse
-
#client ⇒ Object
Internal: Proxy to the client.
-
#connection ⇒ Object
Internal: Proxy to the client’s faraday connection.
-
#initialize(app, client, options) ⇒ Middleware
constructor
A new instance of Middleware.
Constructor Details
#initialize(app, client, options) ⇒ Middleware
Returns a new instance of Middleware.
18 19 20 21 22 23 24 |
# File 'lib/restforce/middleware.rb', line 18 def initialize(app, client, ) super(app) @app = app @client = client @options = end |
Instance Method Details
#client ⇒ Object
Internal: Proxy to the client.
27 28 29 |
# File 'lib/restforce/middleware.rb', line 27 def client @client end |
#connection ⇒ Object
Internal: Proxy to the client’s faraday connection.
32 33 34 |
# File 'lib/restforce/middleware.rb', line 32 def connection client.send(:connection) end |