From 174eab3a7e05219db8bd82fc7843e38b2a2d6e0c Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 23 May 2012 22:59:29 +0800 Subject: [PATCH] tests/soup.js --- tests/soup.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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); -- 2.39.2