Hi everyone,

 

I believe this to be a Shindig bug but need some feedback validating my
thoughts.

 

According to the opensocial RPC spec
http://www.opensocial.org/Technical-Resources/opensocial-spec-v081/rpc-p
rotocol, the following POST and GET RPC requests should be equivalent
and allowed:

 

POST:

POST /rpc HTTP/1.1
Host: api.example.org
Authorization: <Auth token>
Content-Type: application/json
{
  "method" : "people.get",

  "id" : "myself"
  "params" : {

    "userId" : "@me",
    "groupId" : "@self"

  }
}

 

and

 

GET:

http://api.example.org/rpc?method=people.get&id=myself&user...@me&groupI
d...@self

 

However, I believe Shindig's behavior (at least in PHP) is incorrect
here.

 

When a doGet() function gets called in JsonRpcServlet, it calls
dispatch($request, $token), which expects parameters to be in
$request->params.

 

The problem is, if you compare the RPC spec url above with the JSON
"equivalent", it looks like the url doesn't include a &params GET
variable - instead params like groupId, userId, etc are given as
individual GET params. The shindig PHP code doesn't account for that and
skips them altogether.

 

Supporting the GET version of the spec would make debugging easier as
it's a lot easier to send a GET request than a POST request (in addition
to actually adhering to the spec, of course)

 

Does anyone have any comments confirming this as a bug or otherwise?

 

Thanks,

 

Artem Russakovskii

Plaxo Engineer

Reply via email to