Helper function to print response details Args: resp: Response object from the request
(resp: Response)
| 4 | |
| 5 | |
| 6 | async def print_response_info(resp: Response): |
| 7 | """Helper function to print response details |
| 8 | |
| 9 | Args: |
| 10 | resp: Response object from the request |
| 11 | """ |
| 12 | async with resp: |
| 13 | print("\n=== Response Information ===") |
| 14 | print(f"Status Code: {resp.status_code}") |
| 15 | print(f"Version: {resp.version}") |
| 16 | print(f"Response URL: {resp.url}") |
| 17 | print(f"Headers: {resp.headers}") |
| 18 | print(f"Encoding: {resp.encoding}") |
| 19 | print(f"Content-Length: {resp.content_length}") |
| 20 | print(f"Remote Address: {resp.remote_addr}") |
| 21 | print(f"Peer Certificate: {resp.peer_certificate()}") |
| 22 | print(f"Content: {await resp.text()}") |
| 23 | print("========================\n") |
| 24 | |
| 25 | |
| 26 | async def request_firefox(): |
no test coverage detected