-
Notifications
You must be signed in to change notification settings - Fork 7
Examples
fredthedoggy edited this page Mar 29, 2021
·
2 revisions
var http = require('http');
var options = {
host : 'example.com',
port : PORT,
path : '/226d5055-3e41-44f4-a527-ecbce4a6bb28/player_online',
headers : {
'token' : 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
}
method : 'GET'
};
var request = http.request(options, function(res) {
res.on('data', function(data) {
console.log(data)
});
});
request.end();
request.on('error', function(error) {
console.error(error);
});
import requests
x = requests.get("http://example.com:PORT/" + "226d5055-3e41-44f4-a527-ecbce4a6bb28" + "/player_online", headers={"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"})
print(x.text)