From: Alan Knowles Date: Wed, 23 May 2012 15:50:22 +0000 (+0800) Subject: tests/soup.js X-Git-Url: http://git.roojs.org/?p=gitlive;a=commitdiff_plain;h=3951302534116259280a760ad37dc8ad8a142509 tests/soup.js --- diff --git a/tests/soup.js b/tests/soup.js index 77ce923c..653cbeb0 100644 --- a/tests/soup.js +++ b/tests/soup.js @@ -27,12 +27,18 @@ netrc.split("\n").forEach(function(nl) { }); // 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 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.. +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);