Bug
ApiServiceImpl.post<T>() does not forward responseType to Dio's Options, so any POST issued with ApiOptions(responseType: ResponseType.bytes) is silently downgraded to default JSON handling. get<T>() forwards it correctly; post<T>() does not.
lib/src/api_service_impl.dart
get() forwards it (line ~73): responseType: options?.responseType,
post() Options(...) (lines ~105-109): missing.
Impact
A binary POST (e.g. fetching a zstd-compressed body via POST) comes back decoded as a JSON string, producing type 'String' is not a subtype of type 'List<int>?' at the call site. This blocks any consumer that POSTs expecting ResponseType.bytes.
Fix (one line)
Add to the post<T> Options(...), mirroring get():
responseType: options?.responseType,
Verification
Patching the resolved package copy with that single line makes a downstream binary-POST integration test pass end-to-end over real HTTP; reverting it fails again. No other changes needed. A new version cut after this fix would let consumers bump their pin.
Bug
ApiServiceImpl.post<T>()does not forwardresponseTypeto Dio'sOptions, so any POST issued withApiOptions(responseType: ResponseType.bytes)is silently downgraded to default JSON handling.get<T>()forwards it correctly;post<T>()does not.lib/src/api_service_impl.dartget()forwards it (line ~73):responseType: options?.responseType,post()Options(...)(lines ~105-109): missing.Impact
A binary POST (e.g. fetching a zstd-compressed body via POST) comes back decoded as a JSON string, producing
type 'String' is not a subtype of type 'List<int>?'at the call site. This blocks any consumer that POSTs expectingResponseType.bytes.Fix (one line)
Add to the
post<T>Options(...), mirroringget():Verification
Patching the resolved package copy with that single line makes a downstream binary-POST integration test pass end-to-end over real HTTP; reverting it fails again. No other changes needed. A new version cut after this fix would let consumers bump their pin.