Class: Frodo::Middleware::OdataHeaders
- Inherits:
-
Frodo::Middleware
- Object
- Faraday::Middleware
- Frodo::Middleware
- Frodo::Middleware::OdataHeaders
- Defined in:
- lib/frodo/middleware/odata_headers.rb
Overview
Middleware that allows you to specify custom request headers when initializing Frodo client
Instance Method Summary collapse
Methods inherited from Frodo::Middleware
#client, #connection, #initialize
Constructor Details
This class inherits a constructor from Frodo::Middleware
Instance Method Details
#call(env) ⇒ Object
7 8 9 10 11 |
# File 'lib/frodo/middleware/odata_headers.rb', line 7 def call(env) env[:request_headers].merge!({'OData-Version' => '4.0', 'Content-type' => 'application/json'}) @app.call(env) end |