It must have something to do with the implementation of whatever JS library you’re using to construct the XHR. (I.e. the getAllDocuments function.) Sounds like a bug in the library — it should probably be calling stringify itself on the parameters you give it.
In the REST API, when sending a GET _all_docs, the values of the startkey and endkey parameters must be JSON, so if the values are meant to be strings they need to have quotes around them. (Escaped, of course.)
Some string parameters need to be JSON.stringified, and some don’t. As a rule of thumb, any string parameter that represents a key, or keys (e.g. startkey, endkey, key etc) need to the JSON.stringified - others do not such as stale.
I’ve asked the question before, and asked for some clarification in the docs, but so far nothing.