Commit 94b69fc1 authored by Thong Kuah's avatar Thong Kuah

Merge branch '39825-fix-sentry-put-requests' into 'master'

Ensure JSON is used for Sentry requests

See merge request gitlab-org/gitlab!23115
parents 85a7bf7a aa490048
......@@ -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