From 3951302534116259280a760ad37dc8ad8a142509 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 23 May 2012 23:50:22 +0800 Subject: [PATCH] tests/soup.js --- tests/soup.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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); -- 2.39.2