-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathct.html
39 lines (34 loc) · 815 Bytes
/
ct.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html>
<html>
<body>
<!-- Form to redirect the page
to C online compiler -->
<form method="post" action=
"https://www.jdoodle.com/api/redirect-to-post/c-online-compiler">
<textarea name="initScript"
rows="8" cols="80">
</textarea>
<input type="submit" value="Test">
</form>
<script type="text/javascript">
var request = require('request');
var program = {
script : "",
language: "php",
versionIndex: "0",
clientId: "YourClientID",
clientSecret:"YourClientSecret"
};
request({
url: 'https://api.jdoodle.com/v1/execute',
method: "POST",
json: program
},
function (error, response, body) {
console.log('error:', error);
console.log('statusCode:', response && response.statusCode);
console.log('body:', body);
})
</script>
</body>
</html>