You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by kishor <ki...@gmail.com> on 2013/09/28 08:35:39 UTC

Http Component Sending Post Parameters

Hi,
I am using Http component for calling a servlet, with POST method. Servlet
is reading the request parameter using request.getParamByName("paramname")
method. For that sake, i am appending my request data in encoded format to
query param with above paramname. But, when request data size/length
exceeding certain limit, i am getting http 505 response code error.("HTTP
protoacl mismatch". I am wondering why it is giving 505, when request url is
length exceeds limit). 
How can i send my request data as a POST parameter (name value pair, so that
servlet still able to read the data) instead of appending to URL as query
parameter, using Http camel component.

thanks
Kishor



--
View this message in context: http://camel.465427.n5.nabble.com/Http-Component-Sending-Post-Parameters-tp5740321.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Http Component Sending Post Parameters

Posted by kishor <ki...@gmail.com>.
Yes Robert. By adding content type as application/x-www-form-urlencoded, It
worked as expected.
Thank you.



--
View this message in context: http://camel.465427.n5.nabble.com/Http-Component-Sending-Post-Parameters-tp5740321p5740409.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Http Component Sending Post Parameters

Posted by "kraythe ." <kr...@gmail.com>.
You need to send the parameters as the body of the http request using
application/x-www-form-urlencoded<http://en.wikipedia.org/wiki/Application/x-www-form-urlencoded>
 encoding.

*Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
*Author of: Hardcore Java (2003) and Maintainable Java (2012)*
*LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39*


On Sat, Sep 28, 2013 at 1:35 AM, kishor <ki...@gmail.com> wrote:

> Hi,
> I am using Http component for calling a servlet, with POST method. Servlet
> is reading the request parameter using request.getParamByName("paramname")
> method. For that sake, i am appending my request data in encoded format to
> query param with above paramname. But, when request data size/length
> exceeding certain limit, i am getting http 505 response code error.("HTTP
> protoacl mismatch". I am wondering why it is giving 505, when request url
> is
> length exceeds limit).
> How can i send my request data as a POST parameter (name value pair, so
> that
> servlet still able to read the data) instead of appending to URL as query
> parameter, using Http camel component.
>
> thanks
> Kishor
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Http-Component-Sending-Post-Parameters-tp5740321.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>