i am using nodejs request moduleto login . but the user is not authenticated after the request. i am trying this code
var request = require('request');
request.post({
rejactUnauthorized: false,
headers: {'content-type' : 'application/x-www-form-urlencoded'},
url: 'https://site.com/default.aspx',
body: "UserName=myusername&Password=mypassword"
}, function(err, res, body){
console.log(body);
});
it gives me status 200 but it renders the default page its not navigating to the next page. can anyone guide me where is the problem?
my login form is on the default.aspx
THANKS