decodeBody static method
Implementation
static Future<dynamic>? decodeBody(HttpRequest request) async {
String body = await utf8.decodeStream(request);
if (request.headers.contentType?.subType == 'json') {
return jsonDecode(body);
} else {
return body;
}
}