Open ayushin opened 4 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?
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
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.