You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Binary response from axios client returned as string instead of Blob #180
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/hey-api#1420 . Would it be possible to bump the dependency to that version, or is there a workaround for that situation?
Got a hacky fix for it, which is to write an interceptor for this specific request. Not the best solution to the problem, obviously, but it works for now.
Activity
NKT-FRLV commentedon Dec 27, 2025
We have the same issue.
Got a hacky fix for it, which is to write an interceptor for this specific request. Not the best solution to the problem, obviously, but it works for now.