Skip to content

Binary response from axios client returned as string instead of Blob #180

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Manny651 opened this issue Mar 27, 2025 · 0 comments
Open

Comments

@Manny651
Copy link

Manny651 commented Mar 27, 2025

Describe the bug

When generating a (axios) client for an endpoint with a binary response type (i.e content-type=application/octet-stream), the generated response type is Blob:
export type GetSomethingResponse = (Blob | File);
However, at runtime, the query result.data type is a string.

Expected behavior
The query should return a Blob or File value as expected for binary responses.

Version: 1.6.2

Additional context

It looks like this issue has been fixed in @hey-api/openapi-ts v0.59.2 hey-api/openapi-ts#1420 . Would it be possible to bump the dependency to that version, or is there a workaround for that situation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant