Hi,

> I have this rewrite:
> {
> "from": "/u/:key",
> "to": "_list/pouch/user-items",
> "method": "GET",
> "query": {"key": ":key"}
> }
>
> ..which gives me: {"error":"bad_request","reason":"invalid UTF-8 JSON"}
>
> Nothing wrong with the JSON, however, the rewrite handler rewrites to this
> url: example.com/db/_design/app/_list/pouch/user-items?key=somekey
>
> somekey needs to be in double quotes as it is a string. How can I get the
> rewrite handler to produce ?key="somekey" ?


I agree, this is really annoying! The way I've been working around it
is to use a complex key for the view instead. You can rewrite using
{startkey: [':key'], endkey: [':key',{}]} ...and that seems to work
fine.

Hope that helps for now. Hopefully this behaviour will be changed at some point.

Caolan

Reply via email to