mirror of
https://github.com/healthchecks/healthchecks.git
synced 2025-04-10 23:40:11 +00:00
397 B
397 B
Javascript
Below is an example of making a HTTP request to SITE_NAME from Node.js.
var https = require('https');
https.get("PING_URL");
You can also send pings from a browser environment. SITE_NAME sets the
Access-Control-Allow-Origin:*
CORS header, so cross-domain AJAX requests work.
var xhr = new XMLHttpRequest();
xhr.open('GET', 'PING_URL', true);
xhr.send(null);