MCPcopy Index your code
hub / github.com/microsoft/playwright-python / header_value

Method header_value

playwright/sync_api/_generated.py:566–585  ·  view source on GitHub ↗

Response.header_value Returns the value of the header matching the name. The name is case-insensitive. If multiple headers have the same name (except `set-cookie`), they are returned as a list separated by `, `. For `set-cookie`, the `\\n` separator is used. If no headers ar

(self, name: str)

Source from the content-addressed store, hash-verified

564 return mapping.from_impl_list(self._sync(self._impl_obj.headers_array()))
565
566 def header_value(self, name: str) -> typing.Optional[str]:
567 """Response.header_value
568
569 Returns the value of the header matching the name. The name is case-insensitive. If multiple headers have the same
570 name (except `set-cookie`), they are returned as a list separated by `, `. For `set-cookie`, the `\\n` separator is
571 used. If no headers are found, `null` is returned.
572
573 Parameters
574 ----------
575 name : str
576 Name of the header.
577
578 Returns
579 -------
580 Union[str, None]
581 """
582
583 return mapping.from_maybe_impl(
584 self._sync(self._impl_obj.header_value(name=name))
585 )
586
587 def header_values(self, name: str) -> typing.List[str]:
588 """Response.header_values

Callers

nothing calls this directly

Calls 3

from_maybe_implMethod · 0.80
_syncMethod · 0.45
header_valueMethod · 0.45

Tested by

no test coverage detected