Class: CiscoMSE::Middleware::Request::SetFormat

Inherits:
Faraday::Middleware
  • Object
show all
Defined in:
lib/cisco-mse-client/middleware/set_format.rb

Overview

Let the service know that we expect/accept JSON

Instance Method Summary collapse

Instance Method Details

#call(env) ⇒ Object



12
13
14
15
16
# File 'lib/cisco-mse-client/middleware/set_format.rb', line 12

def call(env)
  env[:request_headers]['Accept'] = 'application/json'

  @app.call(env)
end