Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sentry/client.rb')
-rw-r--r--lib/sentry/client.rb15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/sentry/client.rb b/lib/sentry/client.rb
index 65bedbf9e0f..211c828ccc3 100644
--- a/lib/sentry/client.rb
+++ b/lib/sentry/client.rb
@@ -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