tests/soup.js
[gitlive] / tests / soup.js
index 01d0eeb..4b8d195 100644 (file)
@@ -8,14 +8,16 @@ var session = new Soup.SessionSync();
 
 
 // Soup.URI is a struct.
-var uri = new Soup.URI.c_new("http://www.roojs.com/admin.php");
+var uri = new Soup.URI.c_new("http://www.roojs.com/admin.php/Roo/person");
 var msg = new Soup.Message({method:"GET", uri:uri});
 
 var auth = new Soup.Auth.c_new(Soup.AuthBasic.type, msg, "Basic realm=\"Test\"");
 print(auth);
 print(auth.authenticate);
 auth.authenticate('aaaa','bbbb');
-print(auth.get_authorization(msg));
+var authmsg = auth.get_authorization(msg);
+
+msg.request_headers.append('Authorization', authmsg + '==')
 
 //request.headers_append...
 var status = session.send_message(msg);