Hi all,

I writting a simple XPCOM with the following code but the server script cannot detect the postdata. Could anyone please help? Is this a bug since the loadURI is actually doing the POST but the server cannot detect any postdata.

Please advice.

//*******************************************************************
s = "\r\ndata=123\r\n";
var obj, iface, postdata

obj   = Components.classes["@mozilla.org/io/string-input-stream;1"];
iface = Components.interfaces.nsIStringInputStream;

postdata = obj.createInstance(iface);
postdata.setData(s, s.length);
try
{
        var nav = getWebNavigation();
        nav.loadURI("http://foobar.com";, 0, null, postdata, null);
}
catch(e)
{
        alert(e);
}
_______________________________________________
Mozilla-netlib mailing list
Mozilla-netlib@mozilla.org
http://mail.mozilla.org/listinfo/mozilla-netlib

Reply via email to