glynnbird opened a new issue #92: /db/_all_docs with start_key & end_key 
produces "Bad Request"
URL: https://github.com/apache/couchdb-nano/issues/92
 
 
   The `/db/_all_docs` endpoint can take either `startkey` or `start_key` (and 
`endkey` or `end_key`). If I choose the `start_key`/`end_key` option the 
parameters are not JSON.stringified before sending in an HTTP request, whereas 
the `startkey`/`endkey` variants are.
   
   ## Expected Behavior
   
   IF I do `db.list({start_key: "bob", end_key: "rita"})` the values of 
a`start_key` & `end_key` should be JSON.stringified. 
   
   IF I do `db.list({startkey: "bob", endkey: "rita"})` the values of 
a`startkey` & `endkey` **ARE** JSON.stringified. 
   
   ## Current Behavior
   
   Currently `start_key` and `end_key` are not in the list of parameters that 
are JSON.stringified.
   
   ## Possible Solution
   
   Add `start_key` & `end_key` to this array: 
https://github.com/apache/couchdb-nano/blob/master/lib/nano.js#L162
   
   ## Steps to Reproduce (for bugs)
   
   ```
   db.list({start_key: "bob", end_key: "rita"})
   // 400 - Bad Request - invalid UTF-8 JSON
   ```
   
   ## Context
   
   `startkey`/`endkey` works. `start_key`/`end_key` doesn't
   
   ## Your Environment
   
   - Node v8.11.1
   - [email protected]
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to