'Determine the most acceptable content-type.
Based on:
1) URI extension (.json)
2) Content-type header
3) Accept* headers'

def best_match_content_type(self):

    parts = self.path.rsplit('.', 1)
    if (len(parts) > 1):
        _format = parts[1]
        if (_format in ['json']):
            return 'application/{0}'.format(_format)
    type_from_header = self.get_content_type()
    if type_from_header:
        return type_from_header
    ctypes = ['application/json']
    bm = self.accept.best_match(ctypes)
    return (bm or 'application/json')
