On 23 Nov, 08:47, [EMAIL PROTECTED] wrote:
> If you can't manipulate the accept headers can you use the JSONRPC
> binding which will return JSON formatted messges? Looking at the code
> it seems that the JSONRPC binding will only handle POST requests in
> JSON format at the moment. There is a TODO about parsing GETs but the
> code from the RESTRPC binding could be used here to get the effect I
> think you are after. I.e. HTTP params in, JSON out.
That might be a good idea. However at the moment we've already
refactored and extended the restrpc binding to do this. And we've also
improved the GET parsing in the restrpc binding, so we are
concentrating on that one. We're still fine tuning and adding error
handling (output of error messages in json/xml when exceptions occur).
I'll publish the code once it's done for your review.
> If that isn't a viable alternative then I don't have a particular
> objection to adding the path info. I'd like to understand a little
> more about the problem setting accept headers though as that sounded
> like a neater solution. What mechanism are you using for making the
> calls from the browser?
At Tablefinder we use a very very stupidly simple way to do REST JSON
calls. We just do this:
As you can see there's no way to set the headers here :) The pattern
is called Dynamic Script Include and eliminates the need to use the
XMLHTTPRequest object in the browser. It also allows cross-site
scripting which enables widgets and 3rd parties to access the API even
though they're not on the same domain as our API.
You received this message because you are subscribed to the Google Groups
To post to this group, send email to firstname.lastname@example.org
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at