Warning
Polling is considered as development only. Postbacks(webhooks) are considered the best practice for production solutions.
The current limit is 5 per second per application ID.
To poll for a job, you must have the job_id associated with the job (which would be returned from a job submission).
$.ajax({
url: "http://cache.blitline.com/listen/[JOB_ID]",
success: function(data) {
alert("Got data=" + data)
}
});
var options = {
host: 'cache.blitline.com',
port: 80,
path: '/listen/[JOB_ID]'
};
http.get(options, function(res) {
res.on("data", function(chunk) {
console.log("Data=" + chunk);
});
})
require 'net/http'
require 'thread'
require 'json'
Thread.new {
url = "/listen/[JOB_ID]"
response = Net::HTTP.get('cache.blitline.com', url)
data = JSON.parse(response)
puts "Data=" + data.inspect
}
curl 'http://cache.blitline.com/listen/[JOB_ID]'
Simply replace [JOB_ID} with the job ID you are waiting for.