Thank you for your answer. Can you please give me the routing entries
for this?

On Aug 31, 5:55 pm, Gareth McCumskey <[email protected]> wrote:
> There is no need to worry about routing as you can handle REST request all
> within the index action (or whatever other default action you may have
> already setup in your routing for modules) and do checks on whether an
> incoming is a post request. For example:
>
> public function executeIndex (sfWebRequest $request)
> {
>   if ($request->isMethod('post'))
>   {
>      $post_parameters = $request->getPostParameters();
>      $this->processPostRequest($post_parameters);
>   }
>   else if ($request->isMethod('get'))
>   {
>      $get_parameters = $request->getGetParameters();
>      $this->processGetRequest($get_parameters);
>   }
>
> }
>
> public function processPostRequest($parameters)
> {
>
>   //Whatever code here you need to do whatever you want with the post
> parameters
>
> }
>
> public function processGetRequest($parameters)
> {
>
>   //Whatever code here you need to do whatever you want with the get
> parameters
>
>
>
>
>
> }
> On Tue, Aug 31, 2010 at 2:00 PM, Shihab KB <[email protected]> wrote:
> > Dear friends,
>
> > I would like to do one REST API for creating a users by POST method. I
> > am new to REST, php & symfony. I just now created a rest api to get
> > uses from the database.
>
> > Can somebody help me by providing a samples for creating a rest api
> > with POST method... I request you to give me the entry in the routing
> > file, function to be created in the action class and templates. And
> > some test code also. Can you please help me.
>
> > regards
> > Shihab
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it to
> > security at symfony-project.com
>
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]<symfony-users%2bunsubscr...@goog­legroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en
>
> --
> Gareth McCumskeyhttp://garethmccumskey.blogspot.com
> twitter: @garethmcc- Hide quoted text -
>
> - Show quoted text -

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to