Skip to content

Latest commit

 

History

History
42 lines (31 loc) · 1014 Bytes

test.rest

File metadata and controls

42 lines (31 loc) · 1014 Bytes

### GET /hello GET http://localhost:3030/hello

### POST /hello # this will just return whatever is in the request body POST http://localhost:3030/hello content-type: application/json

{
"hello" : "world"

}

### GET /hello-world/:id will return whatever value we put for id GET http://localhost:3030/hello-world/3

### GET /users # send with a token (text after 'Authorization:') received from running a post to /login GET http://localhost:3030/users content-type: application/json Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiaWF0IjoxNjMzODIyODc1LCJleHAiOjE2MzM4MjM0NzV9.BgVi-AkQrLFcGHNg6RhuZEi278YQWgLLOFOoVE3zpF8

### POST /login # copy to token given and paste into Authorization: {token} for /users endpoint POST http://localhost:3030/login content-type: application/json

{
"username" : "imi", "password" : "loveDaddy3"

}

### POST /register POST http://localhost:3030/register content-type: application/json

{
"username" : "newbie", "password" : "newPass"

}