Skip to content
This repository was archived by the owner on May 26, 2020. It is now read-only.

Commit 7bf09ee

Browse files
committed
Merge pull request #5 from GetBlimp/update-readme
Adds curl command with auth headers
2 parents 3e16fc7 + ed0a7a8 commit 7bf09ee

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,16 @@ urlpatterns = patterns(
4545

4646
You can easily test if the endpoint is working by doing the following in your terminal, if you had a user created with the username **admin** and password **abc123**.
4747

48-
```
48+
```bash
4949
$ curl -X POST -d "username=admin&password=abc123" http://localhost:8000/api-token-auth/
5050
```
5151

52+
Now in order to access protected api urls you must include the `Authorization: JWT <your_token>` header.
53+
54+
```bash
55+
$ curl -H "Authorization: JWT <your_token>" http://localhost:8000/protected-url/
56+
```
57+
5258
## Additional Settings
5359
There are some additional settings that you can override similar to how you'd do it with Django REST framework itself. Here are all the available defaults.
5460

0 commit comments

Comments
 (0)