-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
p: dioTargeting `dio` packageTargeting `dio` packages: best practiseIt's the best way to do something so farIt's the best way to do something so fars: featureThis issue indicates a feature requestThis issue indicates a feature request
Description
Request Statement
Hello.
RFC 7807, particularly section 6.1. RFC 9457 indicate application/problem+json
as a proper header signaling the body will be a json, just like application/json
.
The problem is, if we check DioException.response
in such cases, we see a jsonDecode
-able String
.
Solution Brainstorm
We'd like to see application/problem+json
automatically decoded, just like application/json
. To do so, currently, we could change ResponseType.json
to automatically imply that even problem+json
will be decoded like so:
enum ResponseType {
/// Transform the response data to JSON object only when the
/// content-type of response is "application/json" or "application/problem+json".
json,
...
}
Metadata
Metadata
Assignees
Labels
p: dioTargeting `dio` packageTargeting `dio` packages: best practiseIt's the best way to do something so farIt's the best way to do something so fars: featureThis issue indicates a feature requestThis issue indicates a feature request