Hi, 

I have a doubt using REST in cakephp framework 

The URL for the actions 'show','delete' and 'update' remains the same(
http://www.mydomain.com/articles/5) for respective GET , DELETE and PUT 
methods. 
How do we submit the URL with HTtp methods and it gets mapped 
correspondingly? 

I had configured the Routes and included components accordingly. 

But, i still got the action name displayed in URL. 
How do we parse the Http method for 'View' and 'Edit' links? 
In what manner do i need to have links to 'View' and 'Edit' records? 
Currently my links go this way : 

VIEW => <?php echo 
$this->Html->link('View',array('controller'=>'posts','action'=>'view',$detail['Post']['id']));
 
?> 
And my generated URL goes ( http://localhost/mydomain/articles/view/1) 

EDIT => <?php echo 
$this->Html->link('Edit',array('controller'=>'posts','action'=>'edit',$detail['Post']['id']),array('method'=>'post'));
 
?> 
And my generated URL goes ( http://localhost/mydomain/articles/edit/1 ) 

I had used proper POST, GET, PUT methods in my respective forms. 

Is this a corrent way to send links? 
If not please guide me how to send the Http methods with URLs (
http://localhost/mydomain/articles/edit/1 ) and get generated URLs ( 
http://localhost/mydomain/articles/1 ). 
Your guidance will be more helpful for this newbie. 

Thanks in Advance. 

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.


Reply via email to