Rehab_React_Vite_my_old/ответы сервера

86 lines
3.5 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

curl -i -X OPTIONS http://localhost:8093/auth/api/login -H "Origin: http://localhost" -H "Access-Control-Request-Method: POST"
tatyana@fedora:~/Рабочий стол/RehabMobileApp/RehabMobileApp/android$ curl -i -X OPTIONS http://localhost:8093/auth/api/login -H "Origin: http://localhost" -H "Access-Control-Request-Method: POST"
HTTP/1.1 204 No Content
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Accept-Language,Access-Control-Allow-Origin,Authorization,Content-Language,X-Csrf-Token,X-Xsrf-Token,Origin,X-Requested-With,Content-Type,Accept
Access-Control-Allow-Methods: PUT,GET,POST,PATCH,OPTIONS,DELETE
Access-Control-Allow-Origin: http://localhost
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Date: Fri, 22 Aug 2025 08:09:40 GMT
tatyana@fedora:~/Рабочий стол/RehabMobileApp/RehabMobileApp/android$ curl -i -X POST http://localhost:8093/auth/api/login \
-H "Origin: http://localhost" \
-H "Content-Type: application/json" \
-d '{"Email": "krasnova@mail.ru", "Password": "Tatyana1"}'
curl -H "Authorization: Bearer YOUR_TOKEN" http://localhost:8093/pacient/courses
"courses": [
{
"CreatedAt": "2025-08-19T10:50:04.454157+03:00",
"UpdatedAt": "2025-08-19T10:50:04.454157+03:00",
"DeletedAt": null,
"ID": 25,
"Name": "krasnova@mail.ru",
"Email": "krasnova@mail.ru",
"Password": "$2a$10$ryI/OSON56IlmDL0sAHhmOk9vhFkuTRieFlj32p/cKYCrPWGOJZKC",
"Role": "",
"UserDoctorID": 0,
"ExerciseCourses": null,
"Courses": [
{
"ID": 0,
"CreatedAt": "2025-08-15T11:46:58.879953+03:00",
"UpdatedAt": "2025-08-15T11:46:58.879953+03:00",
"DeletedAt": null,
"id": 1,
"title": "Восстановление",
"desc": "Восстановиться",
"time_course": "",
"day_course": 0,
"url_file_img": "https://vivasport.ru/assets/images/news/12555/spine-training-1.webp",
"users": null,
"exercises": null
}
]
},
{
"CreatedAt": "2025-08-20T14:19:19.754239+03:00",
"UpdatedAt": "2025-08-20T14:19:19.754239+03:00",
"DeletedAt": null,
"ID": 26,
"Name": "krasnova5@mail.ru",
"Email": "krasnova5@mail.ru",
"Password": "$2a$10$sdcCn51708LV5y6wsmOho.dLtpDGf43muXobIcvGYQ1.TtB1WxFju",
"Role": "",
"UserDoctorID": 0,
"ExerciseCourses": null,
"Courses": []
}
],
"sessionname": "krasnova@mail.ru"
curl -L -X GET \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NTYxMTUzMTAsInVzZXJfZW1haWwiOiJrcmFzbm92YUBtYWlsLnJ1IiwidXNlcl9pZCI6MjUsInVzZXJfbmFtZSI6ImtyYXNub3ZhQG1haWwucnUiLCJ1c2VyX3JvbGUiOiIifQ.fkP4uDp9TylgLcVZlb5Zs7Po48DdBk42E0Xf1sHsMwk" \
http://localhost:8093/pacient/courses/
ПОИСК ВНУТРИ КУРСА
curl -L -X GET \\
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NTYxMTUzMTAsInVzZXJfZW1haWwiOiJrcmFzbm92YUBtYWlsLnJ1IiwidXNlcl9pZCI6MjUsInVzZXJfbmFtZSI6ImtyYXNub3ZhQG1haWwucnUiLCJ1c2VyX3JvbGUiOiIifQ.fkP4uDp9TylgLcVZlb5Zs7Po48DdBk42E0Xf1sHsMwk" \
http://localhost:8093/pacient/1
curl -L -X GET \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
http://localhost:8093/pacient/course/1/