incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jens Alfke <j...@couchbase.com>
Subject Re: to CouchApp or not to CouchApp
Date Tue, 16 Aug 2011 16:27:35 GMT

On Aug 16, 2011, at 9:16 AM, Marcello Nuccio wrote:

> Ignoring for an instant that this is hard to implement, as Jason says.
> What is the problem if I send an HTML response, if the requested
> resource is HTML?

Because if the client requesting the HTML is not a user-facing web browser, the 302 is the
wrong response, because the client won’t know what to do with the resulting login form (unless
it does screen-scraping.) I’ve already run into this in implementing my CouchCocoa framework.

It is IMHO naive to assume that a browser only wants HTML and a non-browser REST client (like
a native app) only wants JSON. That’s not always true and it’s not the right way to tell
the two apart.

—Jens
Mime
View raw message