Skip to content

Commit 3ca3d69

Browse files
committed
fix: wrong mediaType caused by boolean JSON body
1 parent 80d3513 commit 3ca3d69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/templates/core/nextjs_fetch/getHeaders.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptio
2424
headers['Authorization'] = `Basic ${credentials}`;
2525
}
2626

27-
if (options.body) {
27+
if (options.body !== undefined) {
2828
if (options.mediaType) {
2929
headers['Content-Type'] = options.mediaType;
3030
} else if (isBlob(options.body)) {

0 commit comments

Comments
 (0)