On Wed, Nov 12, 2008 at 7:07 PM, Chirag Shah <[EMAIL PROTECTED]> wrote:
> 1) Developer makes a call
> gadgets.io.makeRequest("http://example.com/?query='select * from
> something'")
> 2) The server will receive this request and transform the url to
> http://example.com/?query=%27select * from something%27
> 3) During XHR callback processing (see the method processResponse in
> features/core.io/io.js) we will try to get the data.
>
> data = data["http://example.com/?query='select * from something'"];
>
> This is undefined because the url it really should be looking for is
> http://example.com/?query=%27select * from something%27That's not correct, they should be looking for the response using the same key as they used for the request. Check out http://svn.apache.org/repos/asf/incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/MakeRequestHandler.java specifically, these two lines: // Use raw param as key as URL may have to be decoded return new JSONObject().put(originalUrl, resp).toString(); The OAuth encoding is a little tricky, but javascript code doesn't need to be aware of it. The signing is done on the server, and it's the server that needs to be careful about exactly which encoding is used. Cheers, Brian

