Skip to content

Commit 44e89e2

Browse files
author
Samuel Alarco Cantos
committed
chore: Add Sulu auth to python-asyncio
1 parent 3996971 commit 44e89e2

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

python-asyncio/run_example.sh

+9-4
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,27 @@ function create_submission() {
1515
echo "[$(date)] Generating request body..." 1>&2
1616
generate_request_body > request_body.json
1717
echo "[$(date)] Creating submission..." 1>&2
18+
19+
# Use these headers for RapidAPI
20+
# -H "X-RapidAPI-Key: $RAPIDAPI_KEY" \
21+
# -H "X-RapidAPI-Host: judge0-ce.p.rapidapi.com" \
1822
curl --progress-bar \
1923
--no-silent \
2024
-X POST \
2125
-H "Content-Type: application/json" \
22-
-H "X-RapidAPI-Key: $RAPIDAPI_KEY" \
23-
-H "X-RapidAPI-Host: judge0-ce.p.rapidapi.com" \
26+
-H "Authorization: Bearer $SULU_KEY" \
2427
--data @request_body.json \
2528
--output request_response.json \
2629
"$JUDGE0_CE_BASE_URL/submissions?base64_encoded=true&wait=false"
2730
cat request_response.json
2831
}
2932

3033
function get_submission() {
34+
# Use these headers for RapidAPI
35+
# -H "X-RapidAPI-Key: $RAPIDAPI_KEY" \
36+
# -H "X-RapidAPI-Host: judge0-ce.p.rapidapi.com" \
3137
curl -H "Accept: application/json" \
32-
-H "X-RapidAPI-Key: $RAPIDAPI_KEY" \
33-
-H "X-RapidAPI-Host: judge0-ce.p.rapidapi.com" \
38+
-H "Authorization: Bearer $SULU_KEY" \
3439
"$JUDGE0_CE_BASE_URL/submissions/$1?base64_encoded=true&fields=$2"
3540
}
3641

0 commit comments

Comments
 (0)