Log into Aesel with a valid username and password.
This will return values in the ‘Set-Cookie’ header, meant for use by browsers, as well as the ‘Authorization’ header, meant for use by external applications.
POST
/v1/login
¶Login to Aesel, retrieving the authentication token required for future requests.
Request Headers: | |
---|---|
|
|
Status Codes: |
|
POST /login HTTP/1.1
Host: localhost:8080
Content-Type: application/json
{
"username": "aesel",
"password": "guest"
}
curl -i -X POST http://localhost:8080/login -H 'Content-Type: application/json' --data-raw '{"password": "guest", "username": "aesel"}'
wget -S -O- http://localhost:8080/login --header='Content-Type: application/json' --post-data='{"password": "guest", "username": "aesel"}'
echo '{
"password": "guest",
"username": "aesel"
}' | http POST http://localhost:8080/login Content-Type:application/json
requests.post('http://localhost:8080/login', headers={'Content-Type': 'application/json'}, json={'password': 'guest', 'username': 'aesel'})