11 lines
500 B
Bash
11 lines
500 B
Bash
TOKEN=$(curl -s -X POST http://localhost:8080/api/auth/login \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"username":"test","password":"cGFzc3dvcmQ="}' | sed -n 's/.*"token":"\([^"]*\)".*/\1/p')
|
|
|
|
#curl -H "Authorization: Bearer $TOKEN" -X POST http://localhost:8080/api/workers/test
|
|
#curl -H "Authorization: Bearer $TOKEN" -XGET http://localhost:8080/api/workers
|
|
curl -G -H "Authorization: Bearer $TOKEN" --data-urlencode "category=FISIO" "http://localhost:8080/api/workers"
|
|
|
|
|
|
#echo "$TOKEN"
|