Request Body not showing in requestTab
marcos930807 opened this issue · 2 comments
Hi thanks for this great work, it would be possible that the request body is also captured by the logs.
After digging a bit into the code, I realized that the body information in the requests is captured even when copying to the clipboard appear, it just doesn't show up in the UI, maybe it has to do with the data type being dynamic and find a way to reflect that in the UI maybe it is difficult, in my case it is a String(in JsonFormat).
Maybe Update This metod and if body is String try to parse as Map.
Widget _buildParam(dynamic data) {
if (data is Map) {
return _buildJsonView('body', data);
} else if (data is FormData) {
formDataMap = Map()..addEntries(data.fields)..addEntries(data.files);
return _getDefText('formdata:${map2Json(formDataMap)}');
} else if (data is String) {
try {
var decodedMap = json.decode(data);
return _buildJsonView('body', decodedMap);
} catch (e) {
return Text('body: $data');
}
} else {
return SizedBox();
}
}
I just tested and Work Fine.
tanks
I can submit a PR
Thank you for your feedback. This issue has been fixed in version 1.3.5