Skip to content

Commit

Permalink
tutorial encode#2 incorrectly showed /item.json instead of /item/.jso…
Browse files Browse the repository at this point in the history
…n for format suffixes
  • Loading branch information
mmarvick committed Jan 26, 2015
1 parent 90c9968 commit 2a6937f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/tutorial/2-requests-and-responses.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Notice that we're no longer explicitly tying our requests or responses to a give

## Adding optional format suffixes to our URLs

To take advantage of the fact that our responses are no longer hardwired to a single content type let's add support for format suffixes to our API endpoints. Using format suffixes gives us URLs that explicitly refer to a given format, and means our API will be able to handle URLs such as [http://example.com/api/items/4.json][json-url].
To take advantage of the fact that our responses are no longer hardwired to a single content type let's add support for format suffixes to our API endpoints. Using format suffixes gives us URLs that explicitly refer to a given format, and means our API will be able to handle URLs such as [http://example.com/api/items/4/.json][json-url].

Start by adding a `format` keyword argument to both of the views, like so.

Expand Down

0 comments on commit 2a6937f

Please sign in to comment.