I am getting below error as I have a HTTP requester node where we have a PUT call so there is no response body.
So while creating inbound response we get below error on Transform node.
Unable to parse empty input, while reading `payload` as Json
If I do a setPaylod like below with empty body then it works.
<set-payload value="#{}" doc:name="Set Payload" doc:id="4d3edefb-a8c4-43af-bfa4-4625f536509f" />
However I am looking for a solution to handle this in the transform node itself.Please let me know how to handle this in transform node in the best possible way ?
Shekh Muenuddeen (NTTData) Forum Ambassador
Hey,
check once with below code in dataweave 2 mule 4
%dw 2.0
output application/java
---
if(!isEmpty(payload))
payload
else
null
As per article its seem content type issue, means request body without content type
https://help.mulesoft.com/s/article/Unable-to-parse-empty-input-error-with-Dataweave-Mule-4