Skip to content

Commit 6cbfe03

Browse files
Merge branch 'trial-testing:main' into main
2 parents 972300c + 25e7f47 commit 6cbfe03

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/auth_try.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,30 @@ jobs:
6767
- name: 🚀 Send POST request with JSON payload to root
6868
run: |
6969
echo "🚀 POST $API_BASE/"
70+
71+
# Debug: show the payload before sending
72+
echo "📄 Payload to send:"
73+
cat "$JSON_PAYLOAD_PATH"
74+
echo
75+
76+
# Perform the POST, capturing both body and status
7077
response=$(curl -s -w "\n%{http_code}" -X POST "$API_BASE/" \
7178
-H "Authorization: Bearer $TOKEN" \
7279
-H "Content-Type: application/json" \
73-
--data-binary "@$JSON_PAYLOAD_PATH")
80+
--data @"$JSON_PAYLOAD_PATH")
81+
7482
body=$(echo "$response" | head -n -1)
7583
status_code=$(echo "$response" | tail -n1)
84+
7685
echo "🌐 HTTP status: $status_code"
7786
echo "🌐 Response body:"
7887
echo "$body" | jq . || true
88+
7989
if [ "$status_code" -ne 200 ]; then
8090
echo "❌ POST failed (HTTP $status_code)"
8191
exit 1
8292
fi
93+
8394
result_status=$(jq -r '.status' <<< "$body")
8495
result_message=$(jq -r '.message' <<< "$body")
8596
if [ "$result_status" != "passed" ]; then

0 commit comments

Comments
 (0)