Skip to content

Commit 75dd022

Browse files
authored
API Gateway: Qwik Start - GSP872
1 parent 094d2c0 commit 75dd022

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

labs/GSP872/lab.sh

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,18 +1031,10 @@ ok "TASK 5 completed."
10311031

10321032
section "[6/6] Testing Calls Using the API Key"
10331033

1034-
GATEWAY_URL=$(
1035-
gcloud api-gateway gateways describe hello-gateway \
1036-
--location="$REGION" \
1037-
--project="$PROJECT_ID" \
1038-
--format="value(defaultHostname)" \
1039-
2>/dev/null || true
1040-
)
1041-
1042-
[ -n "$GATEWAY_URL" ] || fail "Unable to determine Gateway URL."
1034+
export GATEWAY_URL=$(gcloud api-gateway gateways describe hello-gateway --location us-east4 --format json | jq -r .defaultHostname)
1035+
curl -sL $GATEWAY_URL/hello
10431036

1044-
echo "Gateway URL:"
1045-
echo "https://${GATEWAY_URL}"
1037+
curl -sL -w "\n" $GATEWAY_URL/hello?key=$API_KEY
10461038

10471039
echo
10481040
echo "${YELLOW_TEXT}${BOLD_TEXT}Waiting for API key/security propagation...${RESET_FORMAT}"

0 commit comments

Comments
 (0)