Commit 2b015e40 authored by Sean Arnold's avatar Sean Arnold Committed by Michael Kozono

Add Sentry client http put

- Move sentry client http requests into new method
parent 170332c3
......@@ -71,9 +71,22 @@ module Sentry
end
def http_get(url, params = {})
response = handle_request_exceptions do
http_request do
Gitlab::HTTP.get(url, **request_params.merge(params))
end
end
def http_put(url, params = {})
http_request do
Gitlab::HTTP.put(url, **request_params.merge({ body: params }))
end
end
def http_request
response = handle_request_exceptions do
yield
end
handle_response(response)
end
......
......@@ -15,6 +15,10 @@ module Sentry
http_get(issue_api_url(issue_id))[:body]
end
def update_issue(issue_id:, params:)
http_put(issue_api_url(issue_id), params)[:body]
end
def issue_api_url(issue_id)
issue_url = URI(url)
issue_url.path = "/api/0/issues/#{CGI.escape(issue_id.to_s)}/"
......
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