OpenSocial / spec

OpenSocial Specification #social
http://opensocial.org/
Apache License 2.0
106 stars 11 forks source link

Response codes using REST protocol #1296

Closed mmarum-sugarcrm closed 10 years ago

mmarum-sugarcrm commented 11 years ago

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

mmarum-sugarcrm commented 11 years ago

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

mmarum-sugarcrm commented 11 years ago

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

ryanjbaxter commented 10 years ago

+1