We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4572aeb commit ff5c633Copy full SHA for ff5c633
packages/openapi-fetch/src/index.ts
@@ -122,11 +122,11 @@ export default function createClient<Paths extends {}>(clientOptions: ClientOpti
122
redirect: "follow",
123
...options,
124
...init,
125
+ headers: baseHeaders,
126
};
127
if (requestBody) requestInit.body = bodySerializer(requestBody as any);
128
// remove `Content-Type` if serialized body is FormData; browser will correctly set Content-Type & boundary expression
129
if (requestInit.body instanceof FormData) baseHeaders.delete("Content-Type");
- requestInit.headers = baseHeaders;
130
const response = await fetch(finalURL, requestInit);
131
132
// handle empty content
0 commit comments