Remove redundant JSON.parse / JSON.stringify call
When the HTTP calls were switched to Axios vs request, a number of redundant JSON.parse / JSON.stringify calls were introduced. Mostly likely because Axios is pre-parsing the JSON whereas that needed to be explicitly done before. The is most apparent in the .post
and .slingql
functions, because of how the responses are normalized, but there are improvements that could be made in the get
calls as well, primarily if the dontParse
options is provided. That will require tapping into the transformResponse
option for the Axios instance. A POC of a number of these improvements was put together here: https://git.workbench.fourseasons.com/developers/fs-secure/legacy/-/merge_requests/156/diffs#note_49763 .