db.all_docs() with keys returns HTTP 415 "Unsupported media type with url" #177
Comments
This probably has to do with the fact that we are missing the "encoder" piece here. This bug can probably be lumped under the same umbrella as #170. fwiw, I can do a |
Sounds about right. Would it help if I shared my "keys" array? It's 2000 entries. (The recommended object size limit for bulk transactions against Cloudant.) |
Yeah that would help a lot actually that way whoever is tasked with resolving will have the right list to go against. |
Is |
|
The idea being that the app can check the contents of the local filesystem against the database directly by an ID on the primary index. |
This may be a true Heisenbug type situation. I just used your full list of of keys against a database that obviously does not contain any of those matching keys and I got the expected set of 2000 of these: |
I suppose this a good and bad thing. The good is that |
That might explain why at one point, I could have sworn it was working, but today when I tried the "new" method, it gave me the error. Something weird thisway comes... Would debug logging from the library tell us anything that might help? |
The encoder doesn't appear to fix this problem it looks like we're missing a |
The difference in behaviours appears to be down to the server side handling of the |
I can POST a list of keys as JSON data to the requests library, but on the same DB using the Cloudant python library, the call fails with an unsupported media type error. Is it not specifying the content-type properly?
Below is the code. old_method() uses requests, new_method() uses python-cloudant.
old_method() returns JSON from the _all_docs endpoint with the expected 'rows' array for each key included.
new_method() errors with HTTP 415:
The text was updated successfully, but these errors were encountered: