Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Our filestore has a "get file" API, which returns the contents of a filestore entry.
In almost all cases, this API returns verbatim whatever bytes are associated with the entry in the filestore. But there's an exception: if "wt=json" is specified, the API will take the bytes stored in the filestore, attempt to string-ify them, and then package those into a JSON response (complete with 'responseHeader', etc.).
This hidden functionality is undocumented, error-prone (it doesn't support binary content, for instance), makes the response hard to clients to parse, and complicates code on the server side as well.
We should consider deprecating/removing it if there's no compelling purpose I'm missing. Or alternatively: document, test, and harden the functionality (e.g. base64 encode binary content).