MCPcopy Create free account
hub / github.com/EasyIME/PIME / set_header

Method set_header

python/python3/tornado/web.py:372–380  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Callers 15

redirectMethod · 0.95
writeMethod · 0.95
finishMethod · 0.95
write_errorMethod · 0.95
set_etag_headerMethod · 0.95
getMethod · 0.80
set_headersMethod · 0.80
getMethod · 0.80
_accept_connectionMethod · 0.80
getMethod · 0.80
getMethod · 0.80
getMethod · 0.80

Calls 1

_convert_header_valueMethod · 0.95

Tested by 15

getMethod · 0.64
getMethod · 0.64
getMethod · 0.64
getMethod · 0.64
getMethod · 0.64
getMethod · 0.64
getMethod · 0.64
getMethod · 0.64
write_errorMethod · 0.64
getMethod · 0.64
getMethod · 0.64
getMethod · 0.64