You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by William Tam <em...@gmail.com> on 2009/02/24 02:34:05 UTC
question on HttpMessage.populateInitialHeaders
In HttpMessage.populateInitialHeaders(), we only propagate parameters
for GET request. Does anyone see any harm in propagating other
parameters of HTTP methods?
//if the request method is Get, we also populate the http
request parameters
if (request.getMethod().equalsIgnoreCase("GET")) {
names = request.getParameterNames();
while (names.hasMoreElements()) {
String name = (String)names.nextElement();
Object value = request.getParameter(name);
map.put(name, value);
}
}
Thanks,
William
Re: question on HttpMessage.populateInitialHeaders
Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Feb 24, 2009 at 2:34 AM, William Tam <em...@gmail.com> wrote:
> In HttpMessage.populateInitialHeaders(), we only propagate parameters
> for GET request. Does anyone see any harm in propagating other
> parameters of HTTP methods?
I was wondering if the API below can return parameters for POST etc?
Maybe the answer is obvious but I thought that API below fetches the
GET URI parameters?
So which other operations can it also get parameters from?
For POST aren't "paramenters" not stored as HTTP headers?
>
> //if the request method is Get, we also populate the http
> request parameters
> if (request.getMethod().equalsIgnoreCase("GET")) {
> names = request.getParameterNames();
> while (names.hasMoreElements()) {
> String name = (String)names.nextElement();
> Object value = request.getParameter(name);
> map.put(name, value);
> }
> }
>
> Thanks,
> William
>
--
Claus Ibsen
Apache Camel Committer
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/