How to send XML formatted POST DATA to external URL from CakePHP

Hogpoughlob

New Member
I am using CakePHP to write an application that consumes data from a webservice. The webservice API is telling me I need to send my POST DATA as XML, like this:\[code\]<Request> <Key>abcd123</Key> <Param1>myval</Param1></Request>\[/code\]How can I achieve this with CakePHP please? I have tried something like this:\[code\]echo $this->Form->create(Model, array('url' => 'https://myprovider/API/myuserid'));echo $this->Form->input('Key', array('value'=> 'abcd123'));echo $this->Form->input('Param1', array('value'=> 'myval'));echo $this->Form->end('Submit');\[/code\]but how can I turn the POST array into xml before I submit?Many thanks in advance,Chris
 
Back
Top