- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â03-26-2023 05:22 PM
I'm doing a table update from a Node.js script using Axios, which appears to work however the data format in the table appears to change from what was sent as a stringified JSON object, to a mix between object and xml.
In the table, the column where the object goes is defined as a string. The highlighted line is one that was added via REST API (incorrect format), the others manually added (correct format).
The table where the REST API is adding a record is in an application scope.
No matter what I try, my data always looks like "var=value" rather than {"var":"value"} - Any idea what causes this? And what to do to fix it so the REST API update adds the string sent rather than updating it?
Thanks
Ron
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â03-26-2023 08:48 PM
Worked it out after many hours. The 'Body' object in the REST API trigger threw me. The Body object is not passed from the axios post, but CONTAINS the object passed. In the REST API under Body I defined a 'data' key with a string value, then on the client end passed a 'data: JSON.strigify(json)' parameter.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â03-26-2023 08:48 PM
Worked it out after many hours. The 'Body' object in the REST API trigger threw me. The Body object is not passed from the axios post, but CONTAINS the object passed. In the REST API under Body I defined a 'data' key with a string value, then on the client end passed a 'data: JSON.strigify(json)' parameter.