How to Send a POST Request in Python? Need Help with the Code! or What's the Best Way to Make a POST

16 Replies, 597 Views

urllib is pain. `requests` or `httpx` for post request python wins.

Short example:

```python
import httpx
r = httpx.post("url", json={"data": "lol"})
```

`httpx` is async-friendly if you’re into that.

And yeah, docs overcomplicate everything. Just copy-paste and tweak.

Messages In This Thread



Users browsing this thread: 1 Guest(s)