projects
/
gitlive
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fb96fa0
)
tests/soup.js
author
Alan Knowles
<alan@akbkhome.com>
Wed, 23 May 2012 14:59:29 +0000
(22:59 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Wed, 23 May 2012 14:59:29 +0000
(22:59 +0800)
tests/soup.js
patch
|
blob
|
history
diff --git
a/tests/soup.js
b/tests/soup.js
index
337c353
..
dcd6871
100644
(file)
--- a/
tests/soup.js
+++ b/
tests/soup.js
@@
-4,9
+4,17
@@
Soup = imports.gi.Soup;
var session = new Soup.SessionSync();
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});
// 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) {
//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(status);
-print(msg.response_body.data);
+
//
print(msg.response_body.data);