Skip to content

Commit

Permalink
Last two link patches (dotnet#4329)
Browse files Browse the repository at this point in the history
  • Loading branch information
guardrex authored and scottaddie committed Sep 19, 2017
1 parent 53eee1d commit 8c11a14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aspnetcore/tutorials/first-web-api-mac.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ We'll add `Create`, `Update`, and `Delete` methods to the controller. These are

[!code-csharp[Main](first-web-api/sample/TodoApi/Controllers/TodoController.cs?name=snippet_Create)]

This is an HTTP POST method, indicated by the [`[HttpPost]`](https://docs.microsoft.com/aspnet/core/api) attribute. The [`[FromBody]`](https://docs.microsoft.com/aspnet/core/api) attribute tells MVC to get the value of the to-do item from the body of the HTTP request.
This is an HTTP POST method, indicated by the [`[HttpPost]`](/aspnet/core/api/microsoft.aspnetcore.mvc.httppostattribute) attribute. The [`[FromBody]`](/aspnet/core/api/microsoft.aspnetcore.mvc.frombodyattribute) attribute tells MVC to get the value of the to-do item from the body of the HTTP request.

The `CreatedAtRoute` method returns a 201 response, which is the standard response for an HTTP POST method that creates a new resource on the server. `CreatedAtRoute` also adds a Location header to the response. The Location header specifies the URI of the newly created to-do item. See [10.2.2 201 Created](http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html).

Expand Down

0 comments on commit 8c11a14

Please sign in to comment.