Skip to content
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

Support file downloads #46

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

mithodin
Copy link

I am using this software on a project where for some endpoints, we receive a PDF or image file in response. The current response handling in openapi-typescript-fetch makes it hard to extract the file from the response.

I propose that (instead of adding some heuristic for what is binary data and what is not), the user should be able to specify which mime types to handle as binary data and return response.blob() in the data property. This also solves issue #10.

Happy to improve upon this code in any way neccessary in order to get it merged.

@mithodin mithodin force-pushed the support_file_downloads branch from 4d1c23e to 2d30c5c Compare September 23, 2022 07:24
@voxpelli
Copy link

Neat, I did for the reverse flow now: #50

@Rendez Rendez mentioned this pull request Apr 20, 2023
@renanzulian
Copy link

I'm facing the same problem here.

@Ryan-LT
Copy link

Ryan-LT commented May 12, 2024

Same problem here. No way to parse to blob file before making a downloadable file.

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

Successfully merging this pull request may close these issues.

4 participants