couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Carey" <>
Subject Re: Creating views using PUT
Date Sat, 01 Nov 2008 12:39:51 GMT
> I have also tried url-encoding so that the url is
> http://localhost:5984/somedatabase/_design%2fmyview, but I get exactly the
> same result.

Hi Alex

It looks like you were just a case change away from the right result -
%2F to URL encode a /

$ cat bar
{"_id":"_design\/Bar","views":{"all":{"map":"function(doc) {
emit(null, doc); } "}}}
$ curl -H "content-type:application/json" -T bar

You'll probably find working with CouchDB a lot more pleasant when
using a library that takes care of URL and JSON encoding.


View raw message