67a1c744ae
Resolved #2
55 lines
812 B
ReStructuredText
55 lines
812 B
ReStructuredText
#Login to the auth-server
|
|
POST http://127.0.0.1:3200/auth/login HTTP/1.1
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"email": "kayneruse@gmail.com",
|
|
"password": "helloworld"
|
|
}
|
|
|
|
###
|
|
|
|
#Refresh from the auth-server
|
|
POST http://127.0.0.1:3200/auth/token HTTP/1.1
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"token": ""
|
|
}
|
|
|
|
###
|
|
|
|
#Query
|
|
GET http://127.0.0.1:3100/news HTTP/1.1
|
|
|
|
###
|
|
|
|
#Publish
|
|
POST http://127.0.0.1:3100/news HTTP/1.1
|
|
Content-Type: application/json
|
|
Authorization: Bearer
|
|
|
|
{
|
|
"title": "Hello World",
|
|
"author": "Kayne Ruse",
|
|
"body": "Lorem ipsum dolor sit amet..."
|
|
}
|
|
|
|
###
|
|
|
|
#Edit
|
|
PATCH http://127.0.0.1:3100/news/5 HTTP/1.1
|
|
Content-Type: application/json
|
|
Authorization: Bearer
|
|
|
|
{
|
|
"title": "Goodnight World"
|
|
}
|
|
|
|
###
|
|
|
|
#Delete
|
|
DELETE http://127.0.0.1:3100/news/4 HTTP/1.1
|
|
Content-Type: application/json
|
|
Authorization: Bearer
|