Given a MuleMessage object that was created from an HTTP request, how do you get the HTTP headers of the request? I’m using Mule 3.2.1. Thanks.
Given a MuleMessage object that was created from an HTTP request, how do you
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
HTTP headers are stored as inbound-scoped properties. Their property names are prefixed with
http.. For example:But there are other HTTP-related properties inside of the “http.” property namespace as well, such as “http.status” for the status code and “http.request” for the request URL. So, while it’s possible to retrieve individual headers, there’s no reliable, automated way of getting a list of all HTTP headers.
This issue is slated to be fixed in Mule 3.3. Mule 3.3 will organize HTTP-related properties better. For example, all headers will be stored in a property named “http.headers”, and all query string parameters will be parsed and stored in “http.query.params”.