Commit aa490048 authored by Sean Arnold's avatar Sean Arnold Committed by Thong Kuah

Ensure JSON is used for Sentry requests

parent 85a7bf7a
......@@ -33,6 +33,7 @@ module Sentry
def request_params
{
headers: {
'Content-Type' => 'application/json',
'Authorization' => "Bearer #{@token}"
},
follow_redirects: false
......@@ -47,7 +48,7 @@ module Sentry
def http_put(url, params = {})
http_request do
Gitlab::HTTP.put(url, **request_params.merge(body: params))
Gitlab::HTTP.put(url, **request_params.merge(body: params.to_json))
end
end
......
......@@ -30,7 +30,7 @@ describe Sentry::Client::Issue do
let(:default_httparty_options) do
{
follow_redirects: false,
headers: { "Authorization" => "Bearer test-token" }
headers: { 'Content-Type' => 'application/json', 'Authorization' => "Bearer test-token" }
}
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment