INNER CODE UNIT · Python
from_response_header
stephenhillier/starlette_exporter · starlette_exporter/labels.py:60
def from_response_header(
key: str, allowed_values: Optional[Iterable] = None, default: str = ""
):
"""returns a callable class that retrieves a header value from response headers.
starlette_exporter will automatically populate this label value when response headers
are written."""
return ResponseHeaderLabel(key, allowed_values, default)