buildResponseStr method
String
buildResponseStr(
- Response response
)
Implementation
String buildResponseStr(Response<dynamic> response) {
String? contentType = contentType2(response.headers.map);
if(isStr(contentType)){
dynamic data = response.data;
// debugPrint("response : "+ data.toString());
if (data == null){
return "response null";
}
if(data is Map){
return data.toString();
}
return data.toString();
}
response.headers.map["content-type-real"] = [contentType.toString().replaceAll("[", "").replaceAll("]", "")];
response.headers.map["content-type"] = ["text/plain"];
return "not text--> "+ contentType.toString();
}