class WebConsole::Middleware
def json_response(opts = {})
def json_response(opts = {}) status = opts.fetch(:status, 200) headers = { "Content-Type" => "application/json; charset = utf-8" } body = yield.to_json [ status, headers, [ body ] ] end
def json_response(opts = {}) status = opts.fetch(:status, 200) headers = { "Content-Type" => "application/json; charset = utf-8" } body = yield.to_json [ status, headers, [ body ] ] end