Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
aa490048
Commit
aa490048
authored
Jan 15, 2020
by
Sean Arnold
Committed by
Thong Kuah
Jan 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure JSON is used for Sentry requests
parent
85a7bf7a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
lib/sentry/client.rb
lib/sentry/client.rb
+2
-1
spec/lib/sentry/client/issue_spec.rb
spec/lib/sentry/client/issue_spec.rb
+1
-1
No files found.
lib/sentry/client.rb
View file @
aa490048
...
@@ -33,6 +33,7 @@ module Sentry
...
@@ -33,6 +33,7 @@ module Sentry
def
request_params
def
request_params
{
{
headers:
{
headers:
{
'Content-Type'
=>
'application/json'
,
'Authorization'
=>
"Bearer
#{
@token
}
"
'Authorization'
=>
"Bearer
#{
@token
}
"
},
},
follow_redirects:
false
follow_redirects:
false
...
@@ -47,7 +48,7 @@ module Sentry
...
@@ -47,7 +48,7 @@ module Sentry
def
http_put
(
url
,
params
=
{})
def
http_put
(
url
,
params
=
{})
http_request
do
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
end
end
...
...
spec/lib/sentry/client/issue_spec.rb
View file @
aa490048
...
@@ -30,7 +30,7 @@ describe Sentry::Client::Issue do
...
@@ -30,7 +30,7 @@ describe Sentry::Client::Issue do
let
(
:default_httparty_options
)
do
let
(
:default_httparty_options
)
do
{
{
follow_redirects:
false
,
follow_redirects:
false
,
headers:
{
"Authorization"
=>
"Bearer test-token"
}
headers:
{
'Content-Type'
=>
'application/json'
,
'Authorization'
=>
"Bearer test-token"
}
}
}
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment