Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
fcbae5d9
Commit
fcbae5d9
authored
Dec 04, 2014
by
phalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updates based on suggestions
parent
a17d5d2b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
10 deletions
+14
-10
docs/tutorial/1-serialization.md
+6
-3
docs/tutorial/2-requests-and-responses.md
+3
-1
docs/tutorial/quickstart.md
+5
-6
No files found.
docs/tutorial/1-serialization.md
View file @
fcbae5d9
...
...
@@ -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
docs/tutorial/2-requests-and-responses.md
View file @
fcbae5d9
...
...
@@ -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,
...
...
docs/tutorial/quickstart.md
View file @
fcbae5d9
...
...
@@ -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,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment