Return headers as a CaseInsensitiveDict with str keys and str values. Multiple values are joined with ','.
(self)
| 113 | return headers_dict_to_raw(self) |
| 114 | |
| 115 | def to_unicode_dict(self) -> CaseInsensitiveDict: |
| 116 | """Return headers as a CaseInsensitiveDict with str keys |
| 117 | and str values. Multiple values are joined with ','. |
| 118 | """ |
| 119 | return CaseInsensitiveDict( |
| 120 | ( |
| 121 | to_unicode(key, encoding=self.encoding), |
| 122 | to_unicode(b",".join(value), encoding=self.encoding), |
| 123 | ) |
| 124 | for key, value in self.items() |
| 125 | ) |
| 126 | |
| 127 | def to_tuple_list(self) -> list[tuple[str, str]]: |
| 128 | """Return headers as a list of ``(key, value)`` tuples. |