mirror of
https://github.com/foss42/apidash.git
synced 2025-06-04 17:37:05 +08:00
Fixes #415
This commit is contained in:
@ -345,12 +345,14 @@ class ResponseBody extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
var mediaType = responseModel.mediaType;
|
||||
if (mediaType == null) {
|
||||
return ErrorMessage(
|
||||
message:
|
||||
'$kMsgUnknowContentType - ${responseModel.contentType}. $kUnexpectedRaiseIssue');
|
||||
}
|
||||
final mediaType =
|
||||
responseModel.mediaType ?? MediaType(kTypeText, kSubTypePlain);
|
||||
// Fix #415: Treat null Content-type as plain text instead of Error message
|
||||
// if (mediaType == null) {
|
||||
// return ErrorMessage(
|
||||
// message:
|
||||
// '$kMsgUnknowContentType - ${responseModel.contentType}. $kUnexpectedRaiseIssue');
|
||||
// }
|
||||
|
||||
var responseBodyView = getResponseBodyViewOptions(mediaType);
|
||||
var options = responseBodyView.$1;
|
||||
|
Reference in New Issue
Block a user