projects
/
gitlive
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1d72c26
)
tests/soup.js
author
Alan Knowles
<alan@akbkhome.com>
Wed, 23 May 2012 15:50:22 +0000
(23:50 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Wed, 23 May 2012 15:50:22 +0000
(23:50 +0800)
tests/soup.js
patch
|
blob
|
history
diff --git
a/tests/soup.js
b/tests/soup.js
index
77ce923
..
653cbeb
100644
(file)
--- a/
tests/soup.js
+++ b/
tests/soup.js
@@
-27,12
+27,18
@@
netrc.split("\n").forEach(function(nl) {
});
// Soup.URI is a struct.
});
// Soup.URI is a struct.
-var uri = new Soup.URI.c_new("http://www.roojs.com/admin.php/
Roo/person?limit=5
");
+var uri = new Soup.URI.c_new("http://www.roojs.com/admin.php/
Events
");
//var uri = new Soup.URI.c_new("http://www.roojs.com/head.php");
//var uri = new Soup.URI.c_new("http://www.roojs.com/head.php");
-var msg = new Soup.Message({method:"GET", uri:uri});
+var msg = new Soup.Message({method:"POST", uri:uri});
+//var msg = new Soup.Message({method:"GET", uri:uri});
+
// post..
// post..
+var buf = new Soup.Buffer.c_new("remarks=test");
+msg.request_body.append_buffer(buf);
+
+
var auth = new Soup.Auth.c_new(Soup.AuthBasic.type, msg, "Basic realm=\"Test\"");
print(auth);
print(auth.authenticate);
var auth = new Soup.Auth.c_new(Soup.AuthBasic.type, msg, "Basic realm=\"Test\"");
print(auth);
print(auth.authenticate);