Dude, I feel you. Flask’s request handling can be weird. Try this:
```python
@app.route('/submit', methods=['POST'])
def submit():
if not request.is_json:
return "Not JSON!", 400
data = request.get_json()
return data
```
This way, you’ll know if the request isn’t even JSON.
```python
@app.route('/submit', methods=['POST'])
def submit():
if not request.is_json:
return "Not JSON!", 400
data = request.get_json()
return data
```
This way, you’ll know if the request isn’t even JSON.
