hurshi / dio-http-cache

http cache lib for Flutter dio like RxCache
Apache License 2.0
274 stars 223 forks source link

Response data type is String when setting ResponseType.bytes #20

Closed ricpar11 closed 4 years ago

ricpar11 commented 4 years ago

Wrapping the options property of a get request with buildCacheOptions in this way: dio.get( url, options: buildCacheOptions(Duration(days: 7), options: Options(responseType: ResponseType.bytes)) );

The response data property is an String that contains correct data ("[1,23,232...]") but it's not a List of ints ([1,23,232]). Is that the expected behaviour , or it's a bug?

ricpar11 commented 4 years ago

I just realized it only happens when the response is cached, the first time the request's response is a list of int, as expected.

hurshi commented 4 years ago

Hello, thanks for your feedback. Yes, it's a bug. and it has fixed in new version: 0.2.5