-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed as not planned
Labels
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,
...
}