Re: Allow overridden request methods
True, true. It would definitely get around that. -Jared On Thu, May 14, 2009 at 8:29 AM, Brian Candler wrote: > On Thu, May 14, 2009 at 07:08:21AM -0500, Jared Scheel wrote: >> Hmm, didn't think about that. I guess you will need to have some kind >> of request body anyways. Do you think that the request method should >> be set in the data though, or should it be set in the header, since >> the method/header defines how the data should be interpreted? I know >> that's just splitting hairs, but there was some concern about keeping >> the api as clean as possible. > > I think the whole point is to support minimal HTTP clients. If they don't > support PUT or DELETE, there's a good chance they don't support custom HTTP > headers either. >
Re: Allow overridden request methods
Hmm, didn't think about that. I guess you will need to have some kind of request body anyways. Do you think that the request method should be set in the data though, or should it be set in the header, since the method/header defines how the data should be interpreted? I know that's just splitting hairs, but there was some concern about keeping the api as clean as possible. -Jared On Thu, May 14, 2009 at 6:55 AM, Brian Candler wrote: > On Thu, May 14, 2009 at 06:45:28AM -0500, Jared Scheel wrote: >> That's a great point, DELETE does often get ignored. I like the idea >> of having a reserved property in json, but it still relies on your >> ability to push json to couchdb. > > So, you want to be able to replace a PUT with a POST, in some part of the > API where the body is neither JSON nor a HTML FORM upload. > > The only example I can think of is using PUT to upload an attachment, and I > thought there was already a POST multipart/form-data alternative for that. > > What else have I forgotten? >
Allow overridden request methods
That's a great point, DELETE does often get ignored. I like the idea of having a reserved property in json, but it still relies on your ability to push json to couchdb. Somehow the core REST interface should allow this as well. (Once again, sorry if this doesn't fit in the thread right, I sent a message to the list admin, so hopefully I can get this worked out :P )
Re: Allow overridden request methods
Darn it, still not getting this thread from the list. Well, anyways, I don't think it's adding any API complexity, it's just an override for the request method, it would be completely transparent. Like Mikeal said, you just have to check it once and change the request if an override is present. Mikeal, I didn't know Safari had that limitation in the past, that's wild! -Jared On Wed, May 13, 2009 at 11:43 AM, 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. Sometimes you won't have access to > the javascript external interface with flash. Also, by adding support > for this header, it doesn't just benefit flash, but any client that is > restricted (Silverlight for example). > > Thanks! > -Jared > > On Tue, May 12, 2009 at 11:29 PM, Jared Scheel wrote: >> Hello all, >> I recently looked into utilizing couchdb in a Flash application when I >> came across a frustrating limitation: flash only allows GET and POST >> methods. Apparently, this kind of limitation is more common that you >> would expect in certain clients. Unfortunately, this makes using >> couchdb rather difficult. Here's a great post about the problem: >> http://www.mail-archive.com/sling-...@incubator.apache.org/msg00355.html. >> What would be the possibility of allowing request methods to be >> overridden with the X-HTTP-Method-Override header? This would allow >> the request to be made with POST, but the method that couchdb receives >> to be whatever value you attach to the X-HTTP-Method-Override header. >> >> Thanks! >> -Jared >> >
Re: Allow overridden request methods
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. Sometimes you won't have access to the javascript external interface with flash. Also, by adding support for this header, it doesn't just benefit flash, but any client that is restricted (Silverlight for example). Thanks! -Jared On Tue, May 12, 2009 at 11:29 PM, Jared Scheel wrote: > Hello all, > I recently looked into utilizing couchdb in a Flash application when I > came across a frustrating limitation: flash only allows GET and POST > methods. Apparently, this kind of limitation is more common that you > would expect in certain clients. Unfortunately, this makes using > couchdb rather difficult. Here's a great post about the problem: > http://www.mail-archive.com/sling-...@incubator.apache.org/msg00355.html. > What would be the possibility of allowing request methods to be > overridden with the X-HTTP-Method-Override header? This would allow > the request to be made with POST, but the method that couchdb receives > to be whatever value you attach to the X-HTTP-Method-Override header. > > Thanks! > -Jared >
Allow overridden request methods
Hello all, I recently looked into utilizing couchdb in a Flash application when I came across a frustrating limitation: flash only allows GET and POST methods. Apparently, this kind of limitation is more common that you would expect in certain clients. Unfortunately, this makes using couchdb rather difficult. Here's a great post about the problem: http://www.mail-archive.com/sling-...@incubator.apache.org/msg00355.html. What would be the possibility of allowing request methods to be overridden with the X-HTTP-Method-Override header? This would allow the request to be made with POST, but the method that couchdb receives to be whatever value you attach to the X-HTTP-Method-Override header. Thanks! -Jared