SimpleNotes/api/http/test.http

26 lines
436 B
HTTP

# Register a new user
POST http://localhost:8081/login
Content-Type: application/json
{
"username": "hubert",
"password": "test"
}
> {% client.global.set("token", response.body.token); %}
### Get notes
GET http://localhost:8081/notes
Authorization: Bearer {{token}}
### Create a note
POST http://localhost:8081/notes/babar
Content-Type: application/json
Authorization: Bearer {{token}}
{
"tags": [
"Test",
"Dev"
]
}