Skip to content

Commit 6ce7793

Browse files
authored
Update README.md
1 parent 9bb3c1f commit 6ce7793

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.learn/exercises/07-post_todo/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ Also, we are expecting to receive the TODO that the client wants to add inside o
2323
```python
2424
from flask import request
2525

26-
# The request body is already JSON decoded, and it comes in the request.data variable
27-
print(request.data)
26+
# The request body is already JSON decoded, and it comes in the request.json variable
27+
print(request.json)
2828
```
2929

3030
## 📝 Instructions:
@@ -34,7 +34,7 @@ print(request.data)
3434
```python
3535
@app.route('/todos', methods=['POST'])
3636
def add_new_todo():
37-
request_body = request.data
37+
request_body = request.json
3838
print("Incoming request with the following body", request_body)
3939
return 'Response for the POST todo'
4040
```

0 commit comments

Comments
 (0)