Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Commit b03a202

Browse files
author
Steve Peak
authored
update to use upload/v4 endpoint
The `Content-Type` of `plain/text` was a mistake in v3. Fixed in v4.
1 parent d58c87e commit b03a202

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/codecov.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ var sendToCodecovV3 = function(codecov_endpoint, query, upload_body, on_success,
167167
// Direct to S3
168168
request.post(
169169
{
170-
url : urlgrey(codecov_endpoint + '/upload/v3').query(query).toString(),
170+
url : urlgrey(codecov_endpoint + '/upload/v4').query(query).toString(),
171171
body : '',
172172
headers : {
173173
'Content-Type': 'text/plain',
@@ -184,7 +184,7 @@ var sendToCodecovV3 = function(codecov_endpoint, query, upload_body, on_success,
184184
url : result.split('\n')[1],
185185
body : upload_body,
186186
headers : {
187-
'Content-Type': 'plain/text',
187+
'Content-Type': 'text/plain',
188188
'x-amz-acl': 'public-read'
189189
}
190190
}, function(err, response, result){

0 commit comments

Comments
 (0)