Skip to content

Commit

Permalink
sets proper accept / content-type headers for JSON requests
Browse files Browse the repository at this point in the history
  • Loading branch information
janfoeh committed Feb 29, 2016
1 parent 82e04c0 commit 926d42f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/apidiesel/handlers/json.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ def run(request, api_config)

execute_request(request: request,
payload: payload,
api_config: api_config)
api_config: api_config) do |http_request|
http_request.headers = {"Accept" => "application/json", "Content-Type" => "application/json"}
http_request
end

request.metadata[:finished_at] = DateTime.now

Expand Down

0 comments on commit 926d42f

Please sign in to comment.