Https synthetic testing

Please paste the permalink to the page in question below:

If asking about a particular script please copy your script or relevant snippet below:

var assert = require('assert');

var options = {
    url: "https://nms.si.enclab.att.net/nms/v1/base/tel:+15124230157/subscriptions",
    body: '',
    headers: {
        'Content-Type': 'application/json'
        }
};

$http.post(options, function(error, response) {
    console.log(response.statusCode + " status code");
    assert.ok(response.statusCode == 302, 'Good');
    }
);

Please share your question/describe your issue below. Include any screenshots that may help us understand your question:

I am getting “TypeError: Cannot read property ‘statusCode’ of undefined” when the url is https based. If I simply change the url to http, then the script works as expected. Why would https make a difference here?

@yz4898 - I took your script and ran it locally in node (just add a var $http = require('request'); at the top) and I am also seeing the same timeouts you stated when using the https endpoint. Taking a deeper look at the connection, it looks as if your request is timing out when making the https call, I saw the following error message by adding a console.log(error); to the script.

{ [Error: read ECONNRESET] code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' }

This indicates the web request is timing out and you’d need to look into the call to see if there is any failures on your server or indication as to why the https request is timing out but the http request is successful.