projects
/
gitlive
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3800299
)
tests/soup.js
author
Alan Knowles
<alan@akbkhome.com>
Wed, 23 May 2012 14:50:42 +0000
(22:50 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Wed, 23 May 2012 14:50:42 +0000
(22:50 +0800)
tests/soup.js
[new file with mode: 0644]
patch
|
blob
diff --git a/tests/soup.js
b/tests/soup.js
new file mode 100644
(file)
index 0000000..
ac38ddd
--- /dev/null
+++ b/
tests/soup.js
@@ -0,0
+1,18
@@
+#!/usr/bin/env seed
+
+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});
+//request.headers_append...
+var status = session.send_message(msg);
+// session.queue_message(function(ses, msg) {
+//
+//}
+//)
+print(status);
+
+print(msg.response_body);