incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Matheis <matheis.ste...@googlemail.com>
Subject Re: Unable to POST
Date Mon, 07 Feb 2011 08:13:43 GMT
Chris,

why not just send a PUT-Request with Ext? method: 'PUT' or sth like
that, should do the Trick

Regards
Stefan

On Mon, Feb 7, 2011 at 2:33 AM, Chris Johnson <csj790@yahoo.com> wrote:
> I am testing Ext JS running on couch for some of the widgets. I am running
> through some of the examples in Ext in Action, and in one of the exaples,
> there is a POST to a local file that is intended to emulate an actual
> response from the remote server. When I run the example in Couch, I get the
> following error:
>
> |{"error":"method_not_allowed","reason":"Only DELETE,GET,HEAD,PUT allowed"}
> |
>
> To test my sanity, I checked the same file in a standalone version of Apache
> and it worked as expected:
>
> |{success : true}
>
> I know the preferred method when creating docs is to use the PUT method, but
> in this case, not sure I understand why Couch is balking at the request.
>
> Here is a snippet of the code where the error occurs. Specifically the call
> to the url which returns {success : true}
>
>            Ext.Ajax.request({
>                url     : 'scripts/successTrue.js',
>                params  : {
>                    records : recordsToSend
>                },
>                success : function(response) {
>                    grid.el.unmask();
>                    remoteJsonStore.commitChanges();
>
>                    var result = Ext.decode(response.responseText);
>                }
>            });
> |
>
> Thanks
> --cj--
>

Mime
View raw message