Sets the given response header name and value. All header values are converted to strings (`datetime` objects are formatted according to the HTTP specification for the ``Date`` header).
(self, name: str, value: _HeaderTypes)
| 370 | return self._status_code |
| 371 | |
| 372 | def set_header(self, name: str, value: _HeaderTypes) -> None: |
| 373 | """Sets the given response header name and value. |
| 374 | |
| 375 | All header values are converted to strings (`datetime` objects |
| 376 | are formatted according to the HTTP specification for the |
| 377 | ``Date`` header). |
| 378 | |
| 379 | """ |
| 380 | self._headers[name] = self._convert_header_value(value) |
| 381 | |
| 382 | def add_header(self, name: str, value: _HeaderTypes) -> None: |
| 383 | """Adds the given response header and value. |