var session = new Soup.SessionSync();
File = imports['../File.js'].File;
-Netrc.load();
// Soup.URI is a struct.
var uri = new Soup.URI.c_new("http://www.roojs.com/admin.php/Roo/Events");
var auth = new Soup.Auth.c_new(Soup.AuthBasic.type, msg, "Basic realm=\"Test\"");
-print(auth);
-print(auth.authenticate);
-var authvals = authdata['git.roojs.com'];
+
+var authvals = Netrc.forHost('git.roojs.com');
+
auth.authenticate(authvals.login ,authvals.password);
var authmsg = auth.get_authorization(msg);
-print(authmsg);
+//print(authmsg);
msg.request_headers.append('Authorization', authmsg)
//request.headers_append...