How to receive original request body in WSO2
-
08-12-2019 - |
문제
Does anybody know way to receive original request payload (received via HTTP POST), in WSO2 proxies? When i try to access $body variable - it's empty.
해결책
You can receive HTTP POST parameters via configuring right message builder. By default you can find this in axis2.xml file:
<messageBuilder class="org.apache.axis2.builder.XFormURLEncodedBuilder"
contentType="application/x-www-form-urlencoded"/>
Replace that builder with this one and your parameters will appear in message body:
<messageBuilder class="org.apache.synapse.commons.builders.XFormURLEncodedBuilder"
contentType="application/x-www-form-urlencoded" />
제휴하지 않습니다 StackOverflow