[Flow] Curl PUT doesn't works
Carsten Bleicker
carsten at bleicker.de
Fri Mar 14 14:42:44 CET 2014
why do you have identity in your uri and also in body arguments?
also your controller action seems not to have any annotations wich type of is $contact.
please also show the route.
example:
/**
* @param Contact $contact
*/
public function updateAction(Contact $contact){}
example route for your request could be:
-
name: 'Artist Rest'
uriPattern: 'contact/{contact.__identity}
httpMethods: ['PUT']
defaults:
'@package': 'Acme.Foo'
'@controller': 'Contact'
'@action': 'list'
'@format': 'json'
note: route untested
Am 14.03.2014 um 14:31 schrieb Adriano Fialho <afialho.com at gmail.com>:
> *My request:*
> curl -X PUT -d "contact[name]=New name&contact[__identity]=12345"
> http://myservice.com/contact/12345
>
> *And my rest controller update action:*
> public function updateAction($contact){
> MyRepository->update($contact)
> }
>
>
>
> --
>
> *Adriano Fialho*
> 71 8637.3450 - 71 9335.9343
> afialho.com - adriano at afialho.com
>
>
> On Fri, Mar 14, 2014 at 9:50 AM, Adriano Fialho <afialho.com at gmail.com>wrote:
>
>> People,
>>
>> I tried to do a PUT request with php curl to my Flow RestController, but it
>> doesn't works. The request is executed sucessfully, but the updateAction on
>> my controller can't update my object on repository.
>>
>> Do you know anything about that?
>>
>> --
>>
>> *Adriano Fialho*
>> 71 8637.3450 - 71 9335.9343
>> afialho.com - adriano at afialho.com
>> _______________________________________________
>> Flow mailing list
>> Flow at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
>>
> _______________________________________________
> Flow mailing list
> Flow at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
More information about the Flow
mailing list