Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 04bd34c

Browse files
Add proper Content-Type header to fetch requests (#1166)
1 parent 4a38c27 commit 04bd34c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎lib/plugin/gitlab/GitLab.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ class GitLab extends Release {
165165
const url = `${baseUrl}/${endpoint}${options.searchParams ? `?${new URLSearchParams(options.searchParams)}` : ''}`;
166166
const headers = {
167167
'user-agent': 'webpro/release-it',
168+
'Content-Type': typeof options.json !== "undefined" ? 'application/json' : 'text/plain',
168169
[tokenHeader]: this.token
169170
};
170171
const requestOptions = {

0 commit comments

Comments
 (0)