MCPcopy
hub / github.com/aio-libs/aiohttp / get_charset

Method get_charset

aiohttp/multipart.py:480–485  ·  view source on GitHub ↗

Returns charset parameter from ``Content-Type`` header or default.

(self, default=None)

Source from the content-addressed store, hash-verified

478 ''.format(encoding))
479
480 def get_charset(self, default=None):
481 """Returns charset parameter from ``Content-Type`` header or default.
482 """
483 ctype = self.headers.get(CONTENT_TYPE, '')
484 *_, params = parse_mimetype(ctype)
485 return params.get('charset', default)
486
487 @property
488 def filename(self):

Callers 3

textMethod · 0.95
jsonMethod · 0.95
formMethod · 0.95

Calls 2

parse_mimetypeFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected