1

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?

mihai
  • 37,072
  • 9
  • 60
  • 86
tech-man
  • 3,166
  • 2
  • 17
  • 18
  • This is not a node.js question as much as a jQuery question -- it's Basic authentication, no matter what server is on the other end. – Linus Thiel May 09 '12 at 11:01
  • 1
    possible duplicate of [How to use Basic Auth and Jquery and Ajax](http://stackoverflow.com/questions/5507234/how-to-use-basic-auth-and-jquery-and-ajax) – Linus Thiel May 09 '12 at 11:01

0 Answers0