Skip to content

Commit 999a579

Browse files
Update first-web-api.md (#34947)
For me, putting the id in the body was the only way to get past the check in the method: ``` if (id != todoDTO.Id) { return BadRequest(); } ```
1 parent aed2500 commit 999a579

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

aspnetcore/tutorials/first-web-api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,7 @@ Use the `PUT` method to update the `TodoItem` that has Id = 1 and set its name t
690690
Content-Type: application/json
691691
692692
{
693+
"id": 1,
693694
"name": "feed fish",
694695
"isComplete": false
695696
}
@@ -711,6 +712,7 @@ Use Swagger to send a PUT request:
711712

712713
```json
713714
{
715+
"id": 1,
714716
"name": "feed fish",
715717
"isComplete": false
716718
}

0 commit comments

Comments
 (0)