use following code
%dw 1.0
%output application/json
---
inboundProperties."http.query.params" mapObject {
($$) : $[0]
}
With this output will be {"card": "15242424211","phone":"54545454545"}
you can wrap it under array if required by using
%dw 1.0
%output application/json
---
[inboundProperties."http.query.params" mapObject {
($$) : $[0]
}]
This will produce output as [{"card": "15242424211","phone":"54545454545"}]
Please refer org.mule.module.http.internal.ParameterMap
for details of HTTP params.
Hope this help.
Update:-
Please use following for setting query parameters for HTTP outbound request.
<dw:transform-message doc:name="Transform Message">
<dw:set-payload><![CDATA[%dw 1.0
%output application/java
---
inboundProperties."http.query.params" mapObject {
($$) : $[0]
}
]]></dw:set-payload>
</dw:transform-message>
Length Required
HTTP Error 411. The request must be chunked or have a content length.
.. can you please help on this – Gopi Sep 08 '17 at 10:28