I am sending some parameter to mule which is listening through http inbound in 8081 I am sending.
http://localhost:8081/hey?age=manoj
But I don't know How can I take this as from message?? I know I can access it from message and payload but when I try to do this
#[message payload: ['age']]
I am getting error that payload is a String type and I am very much confuse in mule. I want age value.
If you are using Mule 3.6 version or above, the expression has been changed ..
So now, you need the following expression to get the value :-
#[message.inboundProperties.'http.query.params'.age]
You can find the reference here for you query :- https://developer.mulesoft.com/docs/display/current/HTTP+Listener+Connector
This will come in as an inbound property. You can access it using MEL:
<logger message="#[message.inboundProperties['age']]" level="INFO" doc:name="Logger"/>
Be careful though you need to make sure to use the inboundProperty in the same flow as your HTTP Inbound endpoint.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With