OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
21.77k stars 6.57k forks source link

[REQ] [dart-dio] support responseType ResponseType.STREAM in request #6750

Open ayushin opened 4 years ago

ayushin commented 4 years ago

We should support a case when an api method is returning something different than application/json, e.g. a binary file download.

It would work by adding responseType: ResponseType.STREAM into dio request options.

kuhnroyal commented 3 years ago

We are setting ResponseType.bytes when the response is some kind of binary file which is the correct type for binary content. ResponseType.stream would return a ResponseBody which you would have to convert manually to whatever you are expecting, even if it is just json. Can you verify that binary responses yield the correct result with 5.0.0?

clotodex commented 1 year ago

I am looking for ServerSentEvents support - I think this could be a cool step in the direction, since the content type is text/event-stream