This commit is contained in:
17
.history/scripts/test_20250808204608.sh
Normal file
17
.history/scripts/test_20250808204608.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Все запросы будут иметь заголовок Authorization: Bearer $ACCESS
|
||||
# 404, если профиля ещё нет — это корректно
|
||||
curl -sS http://localhost:8080/profiles/v1/profiles/me \
|
||||
-H "Authorization: Bearer $ACCESS"
|
||||
|
||||
# Создание профиля
|
||||
printf '%s' \
|
||||
'{"gender":"female","city":"Moscow","languages":["ru","en"],"interests":["music","travel"]}' \
|
||||
| POST -H "Authorization: Bearer '"$ACCESS"'" \
|
||||
-H "Content-Type: application/json" \
|
||||
http://localhost:8080/profiles/v1/profiles
|
||||
|
||||
# Теперь должен отдать ваш профиль
|
||||
curl -sS http://localhost:8080/profiles/v1/profiles/me \
|
||||
-H "Authorization: Bearer $ACCESS"
|
||||
Reference in New Issue
Block a user