tests/soup.js
[gitlive] / tests / soup.js
index ebfb3cb..309f3f9 100644 (file)
@@ -25,10 +25,11 @@ netrc.split("\n").forEach(function(nl) {
    authdata[line.machine] = line;
     
 });
-print(JSON.stringify(lines));
-
 // Soup.URI is a struct.
-var uri = new Soup.URI.c_new("http://www.roojs.com/admin.php/Roo/person");
+//var uri = new Soup.URI.c_new("http://www.roojs.com/admin.php/Roo/person");
+var uri = new Soup.URI.c_new("http://www.roojs.com/headers.php");
+
 var msg = new Soup.Message({method:"GET", uri:uri});
 
 var auth = new Soup.Auth.c_new(Soup.AuthBasic.type, msg, "Basic realm=\"Test\"");
@@ -37,7 +38,7 @@ print(auth.authenticate);
 var authvals = authdata['git.roojs.com'];
 auth.authenticate(authvals.login ,authvals.password);
 var authmsg = auth.get_authorization(msg);
-
+print(authmsg);
 msg.request_headers.append('Authorization', authmsg + '==')
 
 //request.headers_append...