Thanks Paul .. it's one of those cases which makes one really embarrased when pointed out .. it works now!
Thanks. - Debasish --- On Thu, 4/23/09, Paul Davis <[email protected]> wrote: > From: Paul Davis <[email protected]> > Subject: Re: problem with temp view > To: [email protected], [email protected] > Date: Thursday, April 23, 2009, 12:07 PM > Debasish, > > The end point you want is _temp_view, not _tmp_view. > > Paul Davis > > On Thu, Apr 23, 2009 at 4:23 AM, Debasish Ghosh > <[email protected]> > wrote: > > Hi - > > > > I have been facing a problem with temp view creation > from command line. When > > I try .. > > > > $ curl -vX POST -H "Content-Type: application/json" -d > '{"map" : > > "function(doc) { emit(null, doc) }"}' > > http://localhost:5984/hello-world/_tmp_view > > > > the error that I get is the following .. > > > > {"error":"bad_content_type","reason":"Invalid > Content-Type header for form > > upload"} > > > > The following is the complete response that I get .. > > > > $ curl -vX POST -H "Content-Type: application/json" -d > '{"map" : > > "function(doc) { emit(null, doc) }"}' > > http://localhost:5984/hello-world/_tmp_view > > * About to connect() to localhost port 5984 (#0) > > * Trying 127.0.0.1... connected > > * Connected to localhost (127.0.0.1) port 5984 (#0) > >> POST /hello-world/_tmp_view HTTP/1.1 > >> User-Agent: curl/7.18.0 (i486-pc-linux-gnu) > libcurl/7.18.0 OpenSSL/0.9.8g > > zlib/1.2.3.3 libidn/1.1 > >> Host: localhost:5984 > >> Accept: */* > >> Content-Type: application/json > >> Content-Length: 45 > >> > > < HTTP/1.1 415 Unsupported Media Type > > < Server: CouchDB/0.10.0a767828 (Erlang OTP/R12B) > > < Date: Thu, 23 Apr 2009 08:15:17 GMT > > < Content-Type: text/plain;charset=utf-8 > > < Content-Length: 84 > > < Cache-Control: must-revalidate > > < > > {"error":"bad_content_type","reason":"Invalid > Content-Type header for form > > upload"} > > * Connection #0 to host localhost left intact > > * Closing connection #0 > > > > I was getting a different error last evening when I > was running on a 0.9 > > version. That error was .. > > > > > {"error":"badmatch","reason":"{\"application/json\",[]}"} > > > > The current one runs on a fresh checkout today from > svn. > > > > Any help will be appreciated. > > > > Thanks. > > - Debasish > > >
