mirror of
https://github.com/foss42/apidash.git
synced 2025-12-01 02:07:00 +08:00
streamHttpRequest: replaced string buffering with chunk_expansion
This commit is contained in:
@@ -68,11 +68,9 @@ class HttpResponseModel with _$HttpResponseModel {
|
||||
}, response.headers);
|
||||
MediaType? mediaType = getMediaTypeFromHeaders(responseHeaders);
|
||||
|
||||
//TODO: Review Effectiveness
|
||||
final body = decodeBytes(
|
||||
response.bodyBytes,
|
||||
response.headers['content-type']!,
|
||||
);
|
||||
final body = (mediaType?.subtype == kSubTypeJson)
|
||||
? utf8.decode(response.bodyBytes)
|
||||
: response.body;
|
||||
|
||||
return HttpResponseModel(
|
||||
statusCode: response.statusCode,
|
||||
|
||||
Reference in New Issue
Block a user