File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments