You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
397 B

  1. # Javascript
  2. Below is an example of making a HTTP request to SITE_NAME from Node.js.
  3. ```js
  4. var https = require('https');
  5. https.get("PING_URL");
  6. ```
  7. You can also send pings from a browser environment. SITE_NAME sets the
  8. `Access-Control-Allow-Origin:*` CORS header, so cross-domain AJAX requests work.
  9. ```js
  10. var xhr = new XMLHttpRequest();
  11. xhr.open('GET', 'PING_URL', true);
  12. xhr.send(null);
  13. ```