New Relic Alert on Website

PHOTO EMBED

Tue Mar 09 2021 15:29:16 GMT+0000 (Coordinated Universal Time)

Saved by @Pixelartist #nodejs

//Import the `assert` module to validate results.
var assert = require('assert');

var options = {
    url: "https://some_url.com",
        "headers": {
          "oauth_clientid": 123,
          
          },
        //"timeout": 15000
        };

$http.get(options, function(error, response, body) {
    console.log(response.statusCode + " status code")
    assert.ok(response.statusCode == 401, 'Expected 401 OK response');  
      });
content_copyCOPY

New Relic