OpenSocial/spec

Response codes using REST protocol

mmarum-sugarcrm opened this issue · 3 comments

Original author: laurentw...@gmail.com (September 03, 2012 15:33:59)

Reflecting thread http://groups.google.com/group/opensocial-and-gadgets-spec/browse_thread/thread/b5e67eee48a5bb8a

core-api spec 2.5 still references REST-Response payload as XML as many OS endpoints now return JSON. The suggestion is to update section 2.1.2.1 with the following:

REST-Response-Payload = Return-Object / (<"> "error" <"> ":" RPC-Error)

Despite its name RPC-error definition suits actually quite well
application-level errors in json with rest as well.
Return-object already includes "entry": and the like for collections
etc so it may not need an additional encapsulation.

This is also inline with current Shindig implementation.

Original issue: http://code.google.com/p/opensocial-resources/issues/detail?id=1326

From laurentw...@gmail.com on October 23, 2012 16:28:37
here is a proposed patch

From mgmarum@gmail.com on March 15, 2013 15:07:20
Patch applied in r1711.