request.post({url: "https://example.com", "rejectUnauthorized": false}, form) .on('response', function(response) { if (response.statusCode === 200) { console.log("DONE"); } else { console.log("FAIL"); } });