You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Praveen Ray <pr...@yahoo.com> on 2007/07/17 05:36:08 UTC
reading text/xml data in response handler
Hello Everyone
I've a javascript client library sending text/xml data like this:
var myRequest = new jsx3.net.Request();
myRequest.open("POST","http://myServlet");
myRequest.send(myDocument.getXML());
where jxs3.net.Request is an abstraction built over XMLHttp(It's
Tibco GI javascript library if you must know).
How would I read the xml data sent, in a mod-perl2 response Handler?
$r->param() wouldn't help since the Request Type is not set to
"application/x-www-form-urlencoded"
I'm thinking some way to reading raw-data using $r and then parsing it myself in the Handler but can't find any example of how to read raw data. Apache2::RequestRec doesn't seem to have any '$r->read' method.
Any ideas?
Thanks
Re: reading text/xml data in response handler
Posted by Fred Moyer <fr...@redhotpenguin.com>.
On Mon, 16 Jul 2007 8:44 pm, Praveen Ray wrote:
> How would I read the xml data sent, in a mod-perl2 response Handler?
> $r->param() wouldn't help since the Request Type is not set to
> "application/x-www-form-urlencoded"
>
> I'm thinking some way to reading raw-data using $r and then parsing it
> myself in the Handler but can't find any example of how to read raw
> data. Apache2::RequestRec doesn't seem to have any '$r->read' method.
See Apache2::RequestIO
http://perl.apache.org/docs/2.0/api/Apache2/RequestIO.html#C_read_