()
| 4 | |
| 5 | |
| 6 | async def main(): |
| 7 | resp: rnet.Response = await rnet.request(Method.GET, url="https://www.google.com/") |
| 8 | print("Status Code: ", resp.status_code) |
| 9 | print("Version: ", resp.version) |
| 10 | print("Response URL: ", resp.url) |
| 11 | print("Headers: ", resp.headers) |
| 12 | print("Cookies: ", resp.cookies) |
| 13 | print("Content-Length: ", resp.content_length) |
| 14 | print("Encoding: ", resp.encoding) |
| 15 | print("Remote Address: ", resp.remote_addr) |
| 16 | print("Headers set-cookie: ", resp.headers["set-cookie"]) |
| 17 | |
| 18 | for key in resp.headers: |
| 19 | print(key) |
| 20 | |
| 21 | for key, value in resp.headers.items(): |
| 22 | print(f"{key}: {value}") |
| 23 | |
| 24 | for cookie in resp.cookies: |
| 25 | print(cookie) |
| 26 | |
| 27 | |
| 28 | if __name__ == "__main__": |
no test coverage detected