Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 631 Bytes

File metadata and controls

25 lines (19 loc) · 631 Bytes

API usage examples

Log in

Example with Curl

curl -X POST -H "X-Requested-With: XMLHttpRequest" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{  
    "username": "USERNAME",
    "password": "PASSWORD"}' "http://localhost:9966/api/auth/login"

Example with Python

import requests
import json

response = requests.post("http://localhost:9966/api/auth/login",
                         headers={'X-Requested-With': 'XMLHttpRequest'},
                         json={"username": USERNAME, "password": PASSWORD})
response = response.json()
token = response['token']