We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f79df27 commit 757882cCopy full SHA for 757882c
1 file changed
packages/code-gen/src/api-client/ts-axios.js
@@ -346,7 +346,14 @@ export function tsAxiosGenerateFunction(
346
structureResolveReference(generateContext.structure, route.response)
347
.type === "file"
348
) {
349
- fileWrite(file, `responseType: "blob",`);
+ if (
350
+ generateContext.options.generators.apiClient?.target.targetRuntime ===
351
+ "node.js"
352
+ ) {
353
+ fileWrite(file, `responseType: "stream",`);
354
+ } else {
355
+ fileWrite(file, `responseType: "blob",`);
356
+ }
357
}
358
359
fileWrite(file, `...requestConfig,`);
0 commit comments