Reputation: 5802
I have an HTTP inbound endpoint which receives both GET and POST request. I notice one of the INBOUND scope properties is:
http.method=GET
Right after the http inbound endpoint, I have a choice, and I'd like to check if the message sent is GET or POST. One of my when expressions is:
#[message.getInboundProperties('http.method') == 'GET']
However, this does not work as it doesn't find message. Is there a way I can access the inbound property from my element? I must be trying to get a hold of the value the wrong way.
Upvotes: 0
Views: 913
Reputation: 5802
Easy answer, I took this from my groovy/Java elements, but it turns out I can just do:
#[message.inboundProperties['http.method'] == 'GET']
works like a charm.
Upvotes: 4