Skip to main content
Question

Data mapper in HTTP Actions for multipart endpoints

  • February 27, 2026
  • 5 replies
  • 40 views

Forum|alt.badge.img+1

In my application, all request bodies need to be form data with data as the key and the json body as the value. I am able to handle this in http actions with raw json body by having it be something like data={<insert body here>} and having the header of Content-Type=application/x-www-form-urlencoded

I want to use the new data mapper functionality in http actions so it will handle escaping and such for me, however I cannot seem to find a way to get it to work with this setup. I have attempted numerous times with variations of data: <json to mapper syntax> , but the app always returns with a missing data element error. Is there any way to handle this currently?

5 replies

rgeroulo
Forum|alt.badge.img
  • Employee
  • February 27, 2026

@andrewwhitley can you try $STRINGIFY() on your value? Something like this:

  • data: $STRINGIFY(<json to mapper syntax>)

Kevin Mok
Forum|alt.badge.img+1
  • Community Manager
  • February 27, 2026

Can you also share what you are doing? It’s hard for me to visualize it right now.


Forum|alt.badge.img+1
  • Author
  • Inspiring
  • February 27, 2026

@rgeroulo  - I have tried things like the following as well and am still getting the no data error from the application:
data:
  '$STRINGIFY_JSON({})'

@Kevin Mok - In my action, my raw json body that is accepted by the application is the following:
data={
<json>
}
The app needs the data key for it to be accepted.
When I try to convert this to the data mapper, even when I have data as the first top most element, the application always says that it is missing the data object. From testing in the logs, it looks like the problem is that the request body needs to be a string that the app is then parsing and the data mapper is mapping it to an object. If there is another Content-Type I can use for this to be accepted as valid form-data of data={<json>}
When looking at how it works in postman/curl the body is included with this syntax:
--form 'data="{}"'


varockiasamy

@andrewwhitley Can you try passing it in the query params section with the Key as data and the Value as the json object?


Kevin Mok
Forum|alt.badge.img+1
  • Community Manager
  • March 2, 2026

@andrewwhitley - I think this would send the whole payload as a string

Can you try something such as this:

EVAL():
expression: data.$STRINGIFY_JSON()
args:
data:
data:
xyz: "'test'"