Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 31st, 2012  |  syntax: None  |  size: 0.61 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Pingdom Credential Missing Even If Provided
  2. function get_checks() {
  3.     var options = {
  4.         "hostname" : "api.pingdom.com",
  5.         "path" : "/api/2.0/checks?"+"userpwd=user@example.com"+":"+"password",
  6.         "method" : "GET",
  7.         "headers" : {
  8.             "userpwd" : "user@example.com"+":"+"password",
  9.             "App-Key" : "key"
  10.         },
  11.         "userpwd" : "user@example.com"+":"+"password"
  12.     };
  13.  
  14.     var req = https.request(options, function(response){
  15.         response.on('data', function(response_data) {
  16.             console.log("Response: " + response_data);
  17.         });
  18.     });
  19.  
  20.     req.end();
  21. }