Can someone explain the meaning of requests.post in Python? or What exactly does requests.post in Pyt

14 Replies, 1032 Views

Kinda confused too at first, but here’s how I see it:

`requests.get` = "Hey server, gimme this page."
`requests.post` = "Hey server, here’s some data, do something with it."

Example:

```python
r = requests.post('https://api.example.com/submit', json={'key': 'value'})
```

The `json` param auto-serializes your data. Neat, right?

Messages In This Thread



Users browsing this thread: 1 Guest(s)