mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-24 16:24:18 +03:00
Adjusted client JWT example (#5944)
This commit is contained in:
parent
2ebd479759
commit
c4676510fd
|
@ -269,8 +269,8 @@ For example, using the "Django REST framework JWT" package
|
|||
client = coreapi.Client()
|
||||
schema = client.get('https://api.example.org/')
|
||||
|
||||
action = ['api-token-auth', 'obtain-token']
|
||||
params = {username: "example", email: "example@example.com"}
|
||||
action = ['api-token-auth', 'create']
|
||||
params = {"username": "example", "password": "secret"}
|
||||
result = client.action(schema, action, params)
|
||||
|
||||
auth = coreapi.auth.TokenAuthentication(
|
||||
|
|
Loading…
Reference in New Issue
Block a user