var http = require("http");
var options = {
hostname: 'log.ao.gl',
port: 80,
path: '/?log=4269172824',
method: 'POST',
headers: {
'Content-Type': 'application/json',
}
};
var req = http.request(options, function(res) {
console.log('Status: ' + res.statusCode);
console.log('Headers: ' + JSON.stringify(res.headers));
res.setEncoding('utf8');
res.on('data', function (body) {
console.log('Body: ' + body);
});
});
req.on('error', function(e) {
console.log('problem with request: ' + e.message);
});
// write data to request body
req.write('{"string": "Hello, World"}');
req.end();
import requests, time
r = requests.post('https://log.ao.gl/?log=4269172824', data={"ts":time.time()})
print(r.status_code)
print(r.content)
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace LogvooExample
{
class Program
{
static void Main(string[] args)
{
var task = MakeRequest();
task.Wait();
var response = task.Result;
var body = response.Content.ReadAsStringAsync().Result;
Console.WriteLine(body);
}
private static async Task<HttpResponseMessage> MakeRequest()
{
var httpClient = new HttpClient();
return await httpClient.GetAsync(new Uri("https://log.ao.gl/?log=4269172824"));
}
}
}
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.methods.*;
import org.apache.commons.httpclient.params.HttpMethodParams;
import java.io.*;
public class LogvooTutorial {
public static void main(String[] args) {
HttpClient client = new HttpClient();
GetMethod method = new GetMethod("https://log.ao.gl/?log=4269172824");
try {
int statusCode = client.executeMethod(method);
byte[] responseBody = method.getResponseBody();
System.out.println(new String(responseBody));
} catch (Exception e) {
System.err.println("Fatal error: " + e.getMessage());
e.printStackTrace();
} finally {
method.releaseConnection();
}
}
}