The client mode user name and password is with digest authentication.
I have not tried the library below:
I think the request library below does not implement digest auth correctly.
May Not Work
You Need a Library That Handles DigestAuth
var postData = {
// post data here
}
var postReq = new digestAuthRequest('POST', url, 'username', 'password');
postReq.request(function(data) {
// success callback
// data probably a success message
},function(errorCode) {
// error callback
// tell user request failed
}, postData);