This is my js code to login to a node.js server:
$.get("http://localhost/login", { user: 'abc', pass: '123' }, function(sessionId)
{
document.location.href = "info.html?sessionId=" + sessionId;
});
How should I send user-pass to the server using basic authentication?