lib/flipper/api/action.rb in flipper-api-0.28.3 vs lib/flipper/api/action.rb in flipper-api-1.0.0.pre

- old
+ new

@@ -66,11 +66,11 @@ def initialize(flipper, request) @flipper = flipper @request = request @code = 200 - @headers = { 'Content-Type' => Api::CONTENT_TYPE } + @headers = { 'content-type' => Api::CONTENT_TYPE } end # Public: Runs the request method for the provided request. # # Returns whatever the request method returns in the action. @@ -111,10 +111,10 @@ # # object - json serializable object # status - http status code def json_response(object, status = 200) - header 'Content-Type', Api::CONTENT_TYPE + header 'content-type', Api::CONTENT_TYPE status(status) body = JSON.dump(object) halt [@code, @headers, [body]] end