On 26/02/13 13:38, [email protected] wrote:
> On Mon, Feb 25, 2013 at 08:29:48PM -0800, Peter Secor wrote:
>> The WUI usually has a pretty good json representation of most screens, just 
>> tack on a query arg ?t=json to the WUI URL and see what you get. I used to 
>> use it a lot when running scripts to check node usage but it's also useful 
>> for scraping other node stats. 
> 
> The correct way to do this is to send an "Accept: application/json" header
> in the request. Don't change the url to specify the type of return data.
> The response should have the same mime type. This follows normal REST design
> patterns.

It isn't clear that the separation of resources and representations in REST,
i.e. the fact that different representations don't have different URIs, is
actually a good idea. Certainly *many* sites and APIs don't follow that part.

-- 
David-Sarah Hopwood ⚥

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
tahoe-dev mailing list
[email protected]
https://tahoe-lafs.org/cgi-bin/mailman/listinfo/tahoe-dev

Reply via email to