Skip to content
Snippets Groups Projects
Commit 94b69fc1 authored by Thong Kuah's avatar Thong Kuah
Browse files

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

Ensure JSON is used for Sentry requests

See merge request !23115
parents 85a7bf7a aa490048
No related branches found
No related tags found
2 merge requests!158514Fix CodeReviewMetrics worker failure with kwargs,!23115Ensure JSON is used for Sentry requests
Pipeline #109738202 failed
......@@ -33,6 +33,7 @@ def handle_mapping_exceptions(&block)
def request_params
{
headers: {
'Content-Type' => 'application/json',
'Authorization' => "Bearer #{@token}"
},
follow_redirects: false
......@@ -47,7 +48,7 @@ def http_get(url, params = {})
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 @@
let(:default_httparty_options) do
{
follow_redirects: false,
headers: { "Authorization" => "Bearer test-token" }
headers: { 'Content-Type' => 'application/json', 'Authorization' => "Bearer test-token" }
}
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment