Return the message's Content-Type parameters, as a list. The elements of the returned list are 2-tuples of key/value pairs, as split on the '=' sign. The left hand side of the '=' is the key, while the right hand side is the value. If there is no '=' sign in the pa
(self, failobj=None, header='content-type', unquote=True)
| 687 | return params |
| 688 | |
| 689 | def get_params(self, failobj=None, header='content-type', unquote=True): |
| 690 | """Return the message's Content-Type parameters, as a list. |
| 691 | |
| 692 | The elements of the returned list are 2-tuples of key/value pairs, as |
| 693 | split on the '=' sign. The left hand side of the '=' is the key, |
| 694 | while the right hand side is the value. If there is no '=' sign in |
| 695 | the parameter the value is the empty string. The value is as |
| 696 | described in the get_param() method. |
| 697 | |
| 698 | Optional failobj is the object to return if there is no Content-Type |
| 699 | header. Optional header is the header to search instead of |
| 700 | Content-Type. If unquote is True, the value is unquoted. |
| 701 | """ |
| 702 | missing = object() |
| 703 | params = self._get_params_preserve(missing, header) |
| 704 | if params is missing: |
| 705 | return failobj |
| 706 | if unquote: |
| 707 | return [(k, _unquotevalue(v)) for k, v in params] |
| 708 | else: |
| 709 | return params |
| 710 | |
| 711 | def get_param(self, param, failobj=None, header='content-type', |
| 712 | unquote=True): |