Skip to content

Header

faststream.utils.Header #

Header(real_name: str = '', *, cast: bool = True, default: Any = _empty) -> Any
Source code in faststream/utils/context/builders.py
def Header(  # noqa: N802
    real_name: str = "",
    *,
    cast: bool = True,
    default: Any = _empty,
) -> Any:
    return Context_(
        real_name=real_name,
        cast=cast,
        default=default,
        prefix="message.headers.",
    )