From: Alan Knowles Date: Wed, 23 May 2012 14:59:29 +0000 (+0800) Subject: tests/soup.js X-Git-Url: http://git.roojs.org/?p=gitlive;a=commitdiff_plain;h=174eab3a7e05219db8bd82fc7843e38b2a2d6e0c tests/soup.js --- diff --git a/tests/soup.js b/tests/soup.js index 337c353d..dcd68717 100644 --- a/tests/soup.js +++ b/tests/soup.js @@ -4,9 +4,17 @@ Soup = imports.gi.Soup; var session = new Soup.SessionSync(); + + + // Soup.URI is a struct. var uri = new Soup.URI.c_new("http://www.roojs.com/admin.php"); var msg = new Soup.Message({method:"GET", uri:uri}); + +var auth = new Soap.Auth(); +auth.authenticate('a','b'); +print(auth.get_authorization(msg)); + //request.headers_append... var status = session.send_message(msg); // session.queue_message(function(ses, msg) { @@ -15,4 +23,4 @@ var status = session.send_message(msg); //) print(status); -print(msg.response_body.data); +//print(msg.response_body.data);