Yes, I want to parse it with SimpleXML. But to do this I need to access this data from within CakePHP - and this is my problem: I can't access the POST body (XML snippet) in my controller action ...
(in this case we have a XML snippet in the POST request but it's also possible that we have plain text here) Marcus On 14 Mai, 20:11, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On 5/14/07, Marcus <[EMAIL PROTECTED]> wrote: > > > > > > > Hello guys, > > > I'm trying to get the plain data from a POST (not a submitted form!) > > request. Think about such a request: > > > POST /baz/post_test HTTP/1.1 > > Host: foobar.baz > > Content-Type: text/xml > > Content-Length: 666 > > > <abc> > > <def>123</def> > > </abc> > > > How can I access the POST body (the part starting with "<abc> ...") in > > CakePHP? > > > I can't see anything of the POST body if I dump the Controller's data > > with debug($this) > > > Marcus > > Looks like it's returning XML, so you need to parse the response using > whatever XML tools are available: SimpleXML in PHP 5 is what I always > use, not familiar with all the choices in PHP 4. > > Hope that helps. > > -- > Chris Hartjes > > My motto for 2007: "Just build it, damnit!" > > @TheBallpark -http://www.littlehart.net/attheballpark > @TheKeyboard -http://www.littlehart.net/atthekeyboard --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---