2022-04-05 22:34:06 +03:00
|
|
|
POST http://localhost:3000/api/v1/users/register HTTP/1.1
|
|
|
|
content-type: application/json
|
|
|
|
|
|
|
|
{
|
2022-04-06 18:50:36 +03:00
|
|
|
"username": "another user",
|
|
|
|
"password": "234234234"
|
2022-04-05 22:34:06 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
###
|
|
|
|
|
|
|
|
POST http://localhost:3000/api/v1/users/login HTTP/1.1
|
|
|
|
content-type: application/json
|
|
|
|
|
|
|
|
{
|
2022-04-06 18:50:36 +03:00
|
|
|
"username": "another user",
|
|
|
|
"password": "234234234"
|
2022-04-05 22:34:06 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
###
|
|
|
|
|
|
|
|
GET http://localhost:3000/api/v1/users/self HTTP/1.1
|
2022-04-20 03:14:28 +03:00
|
|
|
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidHlwZSI6MSwiaWF0IjoxNjUwNDA4NTQ1LCJleHAiOjE2NTA1ODEzNDV9.DCt_IpukPaihSGl1N8a5ve5pd75N4aePxR4YKzw98Ss
|
2022-04-06 18:50:36 +03:00
|
|
|
|
|
|
|
###
|
|
|
|
|
|
|
|
POST http://localhost:3000/api/v1/channels HTTP/1.1
|
|
|
|
content-type: application/json
|
2022-04-20 03:14:28 +03:00
|
|
|
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidHlwZSI6MSwiaWF0IjoxNjUwNDA4NTQ1LCJleHAiOjE2NTA1ODEzNDV9.DCt_IpukPaihSGl1N8a5ve5pd75N4aePxR4YKzw98Ss
|
2022-04-06 18:50:36 +03:00
|
|
|
|
|
|
|
{
|
2022-04-17 17:56:03 +03:00
|
|
|
"name": "channel 4"
|
2022-04-06 18:50:36 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
###
|
|
|
|
|
2022-04-17 17:56:03 +03:00
|
|
|
PUT http://localhost:3000/api/v1/channels/7 HTTP/1.1
|
2022-04-05 22:34:06 +03:00
|
|
|
content-type: application/json
|
2022-04-20 03:14:28 +03:00
|
|
|
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidHlwZSI6MSwiaWF0IjoxNjUwNDA4NTQ1LCJleHAiOjE2NTA1ODEzNDV9.DCt_IpukPaihSGl1N8a5ve5pd75N4aePxR4YKzw98Ss
|
2022-04-06 18:50:36 +03:00
|
|
|
#Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MiwidHlwZSI6MSwiaWF0IjoxNjQ5MjU5NDUwLCJleHAiOjE2NDk0MzIyNTB9.JmF9NujFZnln7A-ynNpeyayGBqmR5poAyACYV6RnSQY
|
|
|
|
|
|
|
|
{
|
2022-04-17 17:56:03 +03:00
|
|
|
"name": "modified channel 2"
|
2022-04-06 18:50:36 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
###
|
|
|
|
|
2022-04-17 17:56:03 +03:00
|
|
|
DELETE http://localhost:3000/api/v1/channels/9 HTTP/1.1
|
2022-04-20 03:14:28 +03:00
|
|
|
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidHlwZSI6MSwiaWF0IjoxNjUwNDA4NTQ1LCJleHAiOjE2NTA1ODEzNDV9.DCt_IpukPaihSGl1N8a5ve5pd75N4aePxR4YKzw98Ss
|
2022-04-06 18:50:36 +03:00
|
|
|
#Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MiwidHlwZSI6MSwiaWF0IjoxNjQ5MjU5NDUwLCJleHAiOjE2NDk0MzIyNTB9.JmF9NujFZnln7A-ynNpeyayGBqmR5poAyACYV6RnSQY
|
|
|
|
|
|
|
|
###
|
|
|
|
|
|
|
|
GET http://localhost:3000/api/v1/channels/1 HTTP/1.1
|
2022-04-20 03:14:28 +03:00
|
|
|
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidHlwZSI6MSwiaWF0IjoxNjUwNDA4NTQ1LCJleHAiOjE2NTA1ODEzNDV9.DCt_IpukPaihSGl1N8a5ve5pd75N4aePxR4YKzw98Ss
|
2022-04-07 13:35:36 +03:00
|
|
|
|
|
|
|
###
|
|
|
|
|
|
|
|
GET http://localhost:3000/api/v1/channels HTTP/1.1
|
2022-04-20 03:14:28 +03:00
|
|
|
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidHlwZSI6MSwiaWF0IjoxNjUwNDA4NTQ1LCJleHAiOjE2NTA1ODEzNDV9.DCt_IpukPaihSGl1N8a5ve5pd75N4aePxR4YKzw98Ss
|
2022-04-12 00:02:43 +03:00
|
|
|
|
|
|
|
###
|
|
|
|
|
2022-04-17 17:56:03 +03:00
|
|
|
POST http://localhost:3000/api/v1/channels/1/messages HTTP/1.1
|
2022-04-12 00:02:43 +03:00
|
|
|
content-type: application/json
|
2022-04-20 03:14:28 +03:00
|
|
|
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidHlwZSI6MSwiaWF0IjoxNjUwNDA4NTQ1LCJleHAiOjE2NTA1ODEzNDV9.DCt_IpukPaihSGl1N8a5ve5pd75N4aePxR4YKzw98Ss
|
2022-04-12 00:02:43 +03:00
|
|
|
|
|
|
|
{
|
2022-04-17 17:56:03 +03:00
|
|
|
"content": "i love cheese"
|
2022-04-12 00:02:43 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
###
|
|
|
|
|
2022-04-20 03:44:48 +03:00
|
|
|
GET http://localhost:3000/api/v1/channels/6/messages HTTP/1.1
|
2022-04-20 03:14:28 +03:00
|
|
|
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidHlwZSI6MSwiaWF0IjoxNjUwNDA4NTQ1LCJleHAiOjE2NTA1ODEzNDV9.DCt_IpukPaihSGl1N8a5ve5pd75N4aePxR4YKzw98Ss
|
2022-04-12 00:02:43 +03:00
|
|
|
|
|
|
|
###
|
|
|
|
|
2022-04-12 22:34:54 +03:00
|
|
|
PUT http://localhost:3000/api/v1/messages/3 HTTP/1.1
|
2022-04-12 00:02:43 +03:00
|
|
|
content-type: application/json
|
2022-04-20 03:14:28 +03:00
|
|
|
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidHlwZSI6MSwiaWF0IjoxNjUwNDA4NTQ1LCJleHAiOjE2NTA1ODEzNDV9.DCt_IpukPaihSGl1N8a5ve5pd75N4aePxR4YKzw98Ss
|
2022-04-12 00:02:43 +03:00
|
|
|
|
|
|
|
{
|
|
|
|
"content": "hello again!"
|
|
|
|
}
|
|
|
|
|
|
|
|
###
|
|
|
|
|
2022-04-12 22:34:54 +03:00
|
|
|
GET http://localhost:3000/api/v1/messages/3
|
2022-04-20 03:14:28 +03:00
|
|
|
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidHlwZSI6MSwiaWF0IjoxNjUwNDA4NTQ1LCJleHAiOjE2NTA1ODEzNDV9.DCt_IpukPaihSGl1N8a5ve5pd75N4aePxR4YKzw98Ss
|
2022-04-12 00:02:43 +03:00
|
|
|
|
|
|
|
###
|
|
|
|
|
|
|
|
DELETE http://localhost:3000/api/v1/messages/2 HTTP/1.1
|
2022-04-20 03:14:28 +03:00
|
|
|
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidHlwZSI6MSwiaWF0IjoxNjUwNDA4NTQ1LCJleHAiOjE2NTA1ODEzNDV9.DCt_IpukPaihSGl1N8a5ve5pd75N4aePxR4YKzw98Ss
|