Anyone got any ideas ?
IS the source code available so I can modify it myself ?
Try a response step with 200 and {{null}} in the value part.
Hi Sid,
That unfortunately also return null.
It looks like it’s been naively hard-wired in place of a blank. I suspect it requires a code change in the lib. Is this code available anywhere- happy to mod it myself …
Thanks for your feedback
Damn. I was hoping that would not translate itself to string.
Patrick will reply soon with a solution I hope… He’s been tagged.
An empty string should work, you could use and expression like {{''}}
. I will check the server connect action later on why it is not an empty string when you just leave the text field empty.
That doesn’t work. The SC code appears to be explicitly pushing null whatever a blank state is evident
As a workaround open you SC file and add a data
key-value pair with an empty string.
{
"name": "",
"module": "core",
"action": "response",
"options": {
"status": 200,
"data": ""
}
}
That should give you an empty body.
But if you want to beat the UI and do what I call a pro move just do this so you don’t have to touch the code of the SC.
And you will also get an empty payload.
I will try your pro move now !!
It won’t work either then. It will give you an empty string also
Try with {{{}}}
and {{[]}}
as code values for the empty variable
That will send and empty object or an empty array. Maybe the API will consume that.
I’m out of ideas now
So now we can only wait for the team to add a checkbox in the UI response action Send empty payload
and the appropriate logic in the core files.
What server model are you using (Node,ASP,PHP)?
I’m using Node Patrick
Change the action file directly, add a contentType as property. The action defaults to json content type.
{
"name": "",
"module": "core",
"action": "response",
"options": {
"status": 200,
"contentType": "text/plain",
"data": ""
}
}
Thanks Patrick (and JonL),
Seems so bloody obvious really - had I known you could override the content-type.
Is there any developer-level documentation that you guys ever share? It would really help drive the product development knowing you could override/extend the codebase for the greater good.
Go raibh maith agat
John