ZF-3335: Zend_Rest_Server format inconsistent

Description

  • scalar values are wrapped in a tag followed by success
  • Exceptions are wrapped in a tag followed by failed
  • objects and arrays are NOT wrapped in a tag and followed by success WHEN there is no 'status' property/element at the top level

The case distinction just makes it harder to code clients.

Suggested Fix: handle objects and arrays like scalars and exceptions

Comments

Please evaluate and categorize as necessary. I've already targeted a release, but please update if that schedule is not appropriate or realistic.

Assigned right component

RESTfull web services doesn't must be enclosed in XML response, service can return simple string, binary data or another mime type. Best solution would be create response object like 'Zend_Rest_ServerResponse', where user can set response code, response mime type (like image/png) and data.

Similar request: http://framework.zend.com/issues/browse/ZF-5027

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.