How to Create a POST Request with Body Parameters in Flask? or Flask: How to Properly Create a POST R

20 Replies, 1093 Views

If you’re using curl, don’t forget the `-H` flag for headers! Also, `request.json` should work fine, but adding error handling helps:

```python
data = request.get_json() or {}
```

This way, empty requests won’t crash your app.

Messages In This Thread



Users browsing this thread: 1 Guest(s)