Hello,

Before with Cake 1.3 it was very easy to add content into Cake via command
line using curl and HTTP POST:

I'd setup as such:

*/app/Config/routes.php*

Router::mapResources('central_index_keys');
Router::parseExtensions('xml');

And obviously have* my controller:
*    public $components = array('RequestHandler', 'Session');

I also tried using the Security component; but it kept getting black-holed;
when I would run this command:

* curl -XPUT -d
'<central_index_key><id></id><cik>99999</cik><company_name>str</company_name></central_index_key>'
http://192.168.1.100/cakephp/central_index_keys.xml --header
'content-type:text/xml'

*
or

* curl -XPOST -d
'<central_index_key><id></id><cik>99999</cik><company_name>str</company_name></central_index_key>'
http://192.168.1.100/cakephp/central_index_keys.xml --header
'content-type:text/xml'*


------------


I basically want to be able to; instead of using the Form view in the
browser at http://192.168.1.100/cakephp/central_index_keys/add --- be able
to use Curl on the command line to insert the data in.

How can I achieve this with *Cake 2.0.2?*

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to