Files
marriage/.history/scripts/test_20250808204608.sh
Andrey K. Choi cc87dcc0fa
Some checks failed
continuous-integration/drone/push Build is failing
api development
2025-08-08 21:58:36 +09:00

18 lines
728 B
Bash
Raw 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.

#!/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"