class CodeClimate::Middleware
Public Instance Methods
call(request_env)
click to toggle source
# File lib/code_climate/middleware.rb, line 4 def call(request_env) headers = {} headers['Content-Type'] = 'application/vnd.api+json' headers['Authorization'] = 'Token token=' + CodeClimate::Client.api_token request_env[:request_headers].merge!(headers) @app.call(request_env).on_complete do |response_env| # do something with the response # response_env[:response_headers].merge!(...) end end