Skip to content
This repository was archived by the owner on Aug 14, 2025. It is now read-only.

Commit 6806e8e

Browse files
fix(client): don't send Content-Type for bodyless methods
1 parent c2b9867 commit 6806e8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ export abstract class APIClient {
231231
protected defaultHeaders(opts: FinalRequestOptions): Headers {
232232
return {
233233
Accept: 'application/json',
234-
'Content-Type': 'application/json',
234+
...(['head', 'get'].includes(opts.method) ? {} : { 'Content-Type': 'application/json' }),
235235
'User-Agent': this.getUserAgent(),
236236
...getPlatformHeaders(),
237237
...this.authHeaders(opts),

0 commit comments

Comments
 (0)