File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -15,22 +15,27 @@ function create_submission() {
15
15
echo " [$( date) ] Generating request body..." 1>&2
16
16
generate_request_body > request_body.json
17
17
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" \
18
22
curl --progress-bar \
19
23
--no-silent \
20
24
-X POST \
21
25
-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 " \
24
27
--data @request_body.json \
25
28
--output request_response.json \
26
29
" $JUDGE0_CE_BASE_URL /submissions?base64_encoded=true&wait=false"
27
30
cat request_response.json
28
31
}
29
32
30
33
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" \
31
37
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 " \
34
39
" $JUDGE0_CE_BASE_URL /submissions/$1 ?base64_encoded=true&fields=$2 "
35
40
}
36
41
You can’t perform that action at this time.
0 commit comments