contentType2 method

String? contentType2(
  1. Map<String, dynamic> headers
)

Implementation

String?  contentType2(Map<String,dynamic> headers){
  if(headers == null){
    return "";
  }
  String? type = headers["content-type"].toString();
  //List<String>
  if(type == null || type == "null" || type == "[]"){
    type = headers["Content-Type"].toString();
  }
  if(type == null || type == "null" || type == "[]"){
    type = headers["content-Type"].toString();
  }

  //debugPrint("content type: "+ type);
  return type;
}