Skip to content

sayik/projectone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

authenticate

$ curl localhost:5000/counter
{
    "counter": 0
}


$ curl -XPUT localhost:5000/counter
{
    "message": "The server could not verify that you are authorized to access the URL requested. You either supplied the wrong credentials (e.g. a bad password), or your browser doesn't understand how to supply the credentials required."
}


$ ACCESS_TOKEN=$(curl -XPUT -s localhost:5000/login -d '{"username": "username", "password": "password" }' | jq -r .access_token)
$ curl -XPUT -H "Authorization: Bearer ${ACCESS_TOKEN}" localhost:5000/counter -d '{}'
{
    "counter": 1
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published