hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen J. Butler" <stephen.but...@gmail.com>
Subject Re: Making a call Post with parameters
Date Thu, 30 Aug 2012 01:04:15 GMT
To start off, you should be using HttpClient 4.2.1, unless you have a
specific reason to be using the 3.x series. I'm going to answer for
4.2.1...

On Wed, Aug 29, 2012 at 7:35 PM, ForumWebUser Sir
<forumwebuser@gmail.com> wrote:
> What this have in special is this:
>
> # a first word that it is not exactly a parameter, because it doesn have a
> value.

Creating a BasicNameValuePair with a value of null should work.

> # the last values have a ":" character.

For POST as application/x-www-form-urlencoded the character ":" is
reserved, and thus must be encoded. I suggest you change the server
app to properly handle this.

If you can't for some reason, look at using StringEntity or
ByteArrayEntity. These will let you send a request body as is.

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message