Hi,
i have created module to send JSON REST POST request in my custom app but it always return 400. Suggesting that data are wrongly propagated i have only one bundle.
[
{
“mode”: “High”,
“tone”: “Casual”,
“prompt”: “this is robot text”,
“business”: false,
“rephrase”: true
}
]
and module contains following settings
“method”: “POST”,
“headers”: {
“api-token”: “{{connection.apiKey}}”,
“Content-Type”: “application/json”
},
“qs”: {},
“body”: {
“prompt”: “{{createJSON(parameters.prompt)}}”,
“rephrase”: “{{parameters.rephrase}}”,
“tone”: “{{createJSON(parameters.tone)}}”,
“mode”: “{{createJSON(parameters.mode)}}”,
“business”: “{{parameters.business}}”
},
“response”: {
“output”: “{{parseJSON(body.result)}}”
}
any suggestion?