Code Snippet : Windows NTLM POST using Node JS

let ntlm = require('request-ntlm-lite');

let postData = 'user=test';   //anything

let headers = {'Content-Type': 'application/x-www-form-urlencoded'};

let ntlmOptions = {                 
url: 'postUrl',
username: 'username',
password: 'password',
workstation:'',
rejectUnauthorized: false, //disable ssl certificate error
ntlm_domain: 'domain_name',
json: true,
headers:headers
};


ntlm.post(ntlmOptions, postData, function(error, response, body){
console.log(error);
console.log(response);                     
});

Comments

Popular posts from this blog

Prevent WPF Global Keyboard Hook from stops working after hitting keys a while C# .NET

Generate ArcGIS Token By URL Request From ArcGIS Portal, Federated Environment , ESRI JS API and Angular snippets

Solution: IntelliJ not recognizing a particular file correctly, instead its stuck as a text file