(self, mimetype)
Return the most appropriate Response class for the given mimetype
Return the most appropriate Response class for the given mimetype
Return the most appropriate Response class for the given mimetype
def from_mimetype(self, mimetype):
        """Return the most appropriate Response class for the given mimetype"""
        if mimetype is None:
            return Response
        elif mimetype in self.classes:
            return self.classes[mimetype]
        else:
            basetype = f"{mimetype.split('/')[0]}/*"
            return self.classes.get(basetype, Response)
def from_mimetype ( self , mimetype ) : if mimetype is None : return Response elif mimetype in self . classes : return self . classes [ mimetype ] else : basetype = f"{mimetype.split('/')[0]}/*" return self . classes . get ( basetype , Response )