()
| 3 | |
| 4 | |
| 5 | async def main(): |
| 6 | resp = await rnet.post( |
| 7 | "https://httpbin.org/anything", |
| 8 | form=[("key", "value")], |
| 9 | ) |
| 10 | print("Status Code: ", resp.status_code) |
| 11 | print("Version: ", resp.version) |
| 12 | print("Response URL: ", resp.url) |
| 13 | print("Headers: ", resp.headers) |
| 14 | print("Cookies: ", resp.cookies) |
| 15 | print("Content-Length: ", resp.content_length) |
| 16 | print("Encoding: ", resp.encoding) |
| 17 | print("Remote Address: ", resp.remote_addr) |
| 18 | print("Text: ", await resp.text()) |
| 19 | |
| 20 | |
| 21 | if __name__ == "__main__": |