MCPcopy Index your code
hub / github.com/encode/httpx / print_response_headers

Function print_response_headers

httpx/_main.py:156–167  ·  view source on GitHub ↗
(
    http_version: bytes,
    status: int,
    reason_phrase: bytes | None,
    headers: list[tuple[bytes, bytes]],
)

Source from the content-addressed store, hash-verified

154
155
156def print_response_headers(
157 http_version: bytes,
158 status: int,
159 reason_phrase: bytes | None,
160 headers: list[tuple[bytes, bytes]],
161) -> None:
162 console = rich.console.Console()
163 http_text = format_response_headers(http_version, status, reason_phrase, headers)
164 syntax = rich.syntax.Syntax(http_text, "http", theme="ansi_dark", word_wrap=True)
165 console.print(syntax)
166 syntax = rich.syntax.Syntax("", "http", theme="ansi_dark", word_wrap=True)
167 console.print(syntax)
168
169
170def print_response(response: Response) -> None:

Callers 1

traceFunction · 0.85

Calls 1

format_response_headersFunction · 0.85

Tested by

no test coverage detected