aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphalt2014-12-04 11:20:33 +0000
committerphalt2014-12-04 11:20:33 +0000
commitfcbae5d99f93a28c9aac340bf2d4d2a3930e1a6a (patch)
tree44cfa63038a2a814de96d65d3f31e480173ae7c0
parenta17d5d2b0bff535dc1d7dcbd36947648e7a0511f (diff)
downloaddjango-rest-framework-fcbae5d99f93a28c9aac340bf2d4d2a3930e1a6a.tar.bz2
updates based on suggestions
-rw-r--r--docs/tutorial/1-serialization.md9
-rw-r--r--docs/tutorial/2-requests-and-responses.md4
-rw-r--r--docs/tutorial/quickstart.md11
3 files changed, 14 insertions, 10 deletions
diff --git a/docs/tutorial/1-serialization.md b/docs/tutorial/1-serialization.md
index ba2a0c32..5b1ae6e8 100644
--- a/docs/tutorial/1-serialization.md
+++ b/docs/tutorial/1-serialization.md
@@ -332,9 +332,9 @@ Quit out of the shell...
In another terminal window, we can test the server.
-We can test our API using using `curl` or [httpie][httpie]. Httpie is a user friendly http client that's written in Python. Let's install that.
+We can test our API using using [curl][curl] or [httpie][httpie]. Httpie is a user friendly http client that's written in Python. Let's install that.
-You can install httpie on all operating systems using pip:
+You can install httpie using pip:
pip install httpie
@@ -363,8 +363,10 @@ Finally, we can get a list of all of the snippets:
Or we can get a particular snippet by referencing its id:
- http http://127.0.0.1:8000/snippets/2/ --body
+ http http://127.0.0.1:8000/snippets/2/
+ HTTP/1.1 200 OK
+ ...
{
"id": 2,
"title": "",
@@ -390,3 +392,4 @@ We'll see how we can start to improve things in [part 2 of the tutorial][tut-2].
[virtualenv]: http://www.virtualenv.org/en/latest/index.html
[tut-2]: 2-requests-and-responses.md
[httpie]: https://github.com/jakubroztocil/httpie#installation
+[curl]: http://curl.haxx.se
diff --git a/docs/tutorial/2-requests-and-responses.md b/docs/tutorial/2-requests-and-responses.md
index dcaf7c0c..08746cd7 100644
--- a/docs/tutorial/2-requests-and-responses.md
+++ b/docs/tutorial/2-requests-and-responses.md
@@ -127,8 +127,10 @@ Go ahead and test the API from the command line, as we did in [tutorial part 1][
We can get a list of all of the snippets, as before.
- http http://127.0.0.1:8000/snippets/ --body
+ http http://127.0.0.1:8000/snippets/
+ HTTP/1.1 200 OK
+ ...
[
{
"id": 1,
diff --git a/docs/tutorial/quickstart.md b/docs/tutorial/quickstart.md
index 41e864cc..43220ce8 100644
--- a/docs/tutorial/quickstart.md
+++ b/docs/tutorial/quickstart.md
@@ -24,10 +24,6 @@ Create a new Django project named `tutorial`, then start a new app called `quick
django-admin.py startapp quickstart
cd ..
-Optionally, install [httpie][httpie] for tastier HTTP requests:
-
- pip install httpie
-
Now sync your database for the first time:
python manage.py migrate
@@ -163,9 +159,12 @@ We can now access our API, both from the command-line, using tools like `curl`..
]
}
-Or with [httpie][httpie], a tastier version of `curl`...
+Or using the [httpie][httpie], command line tool...
+
+ bash: http -a username:password http://127.0.0.1:8000/users/
- bash: http -a username:password http://127.0.0.1:8000/users/ --body
+ HTTP/1.1 200 OK
+ ...
{
"count": 2,
"next": null,