Mule 3 - Getting Post form-data content

In mule 3, there is following way to get the data submitted thought the POST request in form-data.

<flow name="demo01072018Flow1">
        <http:listener config-ref="HTTP_Listener_Configuration" path="/demo2" doc:name="HTTP"/>
        <logger message="Name is = #[message.inboundAttachments.'name'.getContent()]" level="INFO" doc:name="Logger"/>
        <logger message="Email is = #[message.inboundAttachments.'email'.getContent()]" level="INFO" doc:name="Logger"/>
        <set-payload value="Thanks" doc:name="Set Payload"/>
    </flow>

mule-post-form-data.jpg

 

Logger Output:

org.mule.api.processor.LoggerMessageProcessor: Name is = Abc
org.mule.api.processor.LoggerMessageProcessor: Email is = skldlss@gmail.com

Tags