zend-patterns / ZendServerSDK

Pure ZF2 CLI for zpk creation and webapi client.
BSD 3-Clause "New" or "Revised" License
22 stars 17 forks source link

When using the filterSave method, the zs-client.phar sends an HTTP method error #63

Closed ericovasconcelos closed 9 years ago

ericovasconcelos commented 9 years ago

I've tried to use a method to import a filter rule from one server to other, but when using the filterSave method, it requires a POST method:

php zs-client.phar filterSave --type=issue --target=zst --name=CLIQueryAllEvents --data={"applicationIds":[29]} 2015-04-30T16:24:43-03:00 ERR (3): This action requires a HTTP POST method

filterSave unexpectedHttpMethod # # The application has thrown an exception! ZendServerWebApi\Model\Exception\ApiException This action requires a HTTP POST method
slaff commented 9 years ago

@ericovasconcelos The issue is fixed in the latest phar ( https://github.com/zend-patterns/ZendServerSDK/raw/master/bin/zs-client.phar ) version. Make sure also to use query string formatting for passing the data and not json formatting. The correct way to test the filterSave with the data that you have provided will be:

php zs-client.phar filterSave --type=issue --target=zst --name=CLIQueryAllEvents --data="applicationIds[]=29"