class FinAppsCore::Middleware::AcceptJson
This middleware sets the Accept request-header field to specify JSON as acceptable media type for the response.
Constants
- KEY
Public Instance Methods
call(env)
click to toggle source
# File lib/finapps_core/middleware/request/accept_json.rb 10 def call(env) 11 env[:request_headers][KEY] = 'application/json' 12 @app.call(env) 13 end