Skip to content

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

Description

@Manny651

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/hey-api#1420 . Would it be possible to bump the dependency to that version, or is there a workaround for that situation?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions