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 t
(self, failobj=None, header='content-type', unquote=True)
| 671 | return params |
| 672 | |
| 673 | def get_params(self, failobj=None, header='content-type', unquote=True): |
| 674 | """Return the message's Content-Type parameters, as a list. |
| 675 | |
| 676 | The elements of the returned list are 2-tuples of key/value pairs, as |
| 677 | split on the `=' sign. The left hand side of the `=' is the key, |
| 678 | while the right hand side is the value. If there is no `=' sign in |
| 679 | the parameter the value is the empty string. The value is as |
| 680 | described in the get_param() method. |
| 681 | |
| 682 | Optional failobj is the object to return if there is no Content-Type |
| 683 | header. Optional header is the header to search instead of |
| 684 | Content-Type. If unquote is True, the value is unquoted. |
| 685 | """ |
| 686 | missing = object() |
| 687 | params = self._get_params_preserve(missing, header) |
| 688 | if params is missing: |
| 689 | return failobj |
| 690 | if unquote: |
| 691 | return [(k, _unquotevalue(v)) for k, v in params] |
| 692 | else: |
| 693 | return params |
| 694 | |
| 695 | def get_param(self, param, failobj=None, header='content-type', |
| 696 | unquote=True): |
no test coverage detected