couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Anderson <jch...@apache.org>
Subject Re: Allow overridden request methods
Date Wed, 13 May 2009 20:59:32 GMT
On Wed, May 13, 2009 at 10:11 AM, Mikeal Rogers <mikeal.rogers@gmail.com> wrote:
>
> On May 13, 2009, at May 13, 20099:58 AM, Jan Lehnardt wrote:
>
>>
>> On 13 May 2009, at 18:43, Jared Scheel wrote:
>>
>>> Sorry for responding to my original message instead of a reply in the
>>> thread, but I seem to be having some issues with the mailing list.
>>> Oliver, you are right, I could use a javascript wrapper for flash. The
>>> problem with that is that it introduces a second dependency to
>>> interact with the REST interface.
>>
>> It adds a second API and complexity to CouchDB to support
>> non-standard clients. I.e: If you don't speak HTTP, you can't
>> talk to CouchDB.
>
> In nearly every REST API I've written in the last 5 years I've checked for
> x-http-method-override and just changed the request method in the request
> before it hits the rest of the application logic.
>
> Not too long ago, Safari didn't support PUT and everyone, especially Google,
> got on the x-http-method-override bandwagon. In fact, I believe all of their
> APIs still support x-http-method-override.
>
> This silly limitation is a lot more common than you would think and it's
> usually done under some kind of "security" pretense. Sure, this particular
> time around it's Flash, which I certainly couldn't care less about, but I
> think as more clients start using CouchDB you're going to see this come up
> more and more.
>
> I think it's unfair to characterize these clients as "not supporting HTTP"
> when in reality they support a sandboxed HTTP API which unnecessarily limits
> their usage.
>

The simple answer is to POST to /db/_bulk_docs which works just fine
for all of CRUD and has no overhead associated with using it on a
single document. Does that work for you? (It won't create or drop
databases but you probably don't want flash doing that anyway.)

Chris

-- 
Chris Anderson
http://jchrisa.net
http://couch.io

Mime
View raw message