Submitting the "Test Now" form above, you made the following request to the API:
src
: nulllevel
: AAAcertainty
: 0 (minimum certainty)priority
: 0 (minimum priority)docID
: dfghjkhhgffdsafghsystemID
: DEFAULT_SYSTEMreportID
: DEFAULT_REPORTviewPortWidth
: 1024viewPortWidth
: 768uaString
: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36importance
: 1 (true)ref
: 1 (true)fragment
: 0 (false)store
: 0 (false)curl -X POST -H Content-Type:application/x-www-form-urlencoded -H Cache-Control:no-cache -d 'url=URL-TO-TEST&key=PUT-YOUR-KEY-HERE' http://tenon.io/api/
$opts['key'] = 'YOUR API KEY GOES HERE';
$opts['url'] = 'YOUR URL TO TEST GOES HERE';
// open connection
$ch = curl_init();
// set our curl options
curl_setopt($ch, CURLOPT_URL, 'http://tenon.io/api/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_FAILONERROR, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $opts);
//execute post and get results
$result = curl_exec($ch);
//close connection
curl_close($ch);
//this converts the JSON API response to a PHP array
$result = json_decode($result, true);
import urllib
params = urllib.urlencode({'url': 'PUT-YOUR-URl-HERE', 'key': 'PUT-YOUR-KEY-HERE'})
f = urllib.urlopen("http://tenon.io/api/", params)
print f.read()
import urllib.request
import urllib.parse
data = urllib.parse.urlencode({'url': 'PUT-YOUR-URL-HERE', 'key': 'PUT-YOUR-KEY-HERE'})
data = data.encode('utf-8')
request = urllib.request.Request("http://tenon.io/api/")
# adding charset parameter to the Content-Type header.
request.add_header("Content-Type","application/x-www-form-urlencoded;charset=utf-8")
f = urllib.request.urlopen(request, data)
print(f.read().decode('utf-8'))
var querystring = require('querystring');
var data = querystring.stringify({
url: PUT-YOUR-URL-HERE,
key: PUT-YOUR-KEY-HERE
});
var options = {
host: 'www.tenon.io',
port: 80,
path: '/api/',
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Content-Length': Buffer.byteLength(data)
}
};
var req = http.request(options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log("body: " + chunk);
});
});
req.write(data);
req.end();
uri = URI('http://tenon.io/api/')
res = Net::HTTP.post_form(uri, 'key' => 'PUT-YOUR-KEY-HERE', 'url' => 'PUT-YOUR-URL-HERE')
puts res.body