isJsonResponse static method
Returns true
if the Response
or DioError
contains a JSON response.
Implementation
static bool isJsonResponse(Response<dynamic> response) =>
response.headers[Headers.contentTypeHeader]![0] ==
ContentTypeLiterals.APPLICATION_JSON;