I've meant that your string parameter will be sent without any encoding. For example: String yourParamsString = "I would like to send something strange @$$...@~"; > byte[] params = yourParamsString.getBytes(); > postEntityParams = new ByteArrayEntity(params); and your POST data will be :
I would like to send something strange @$$...@~ May be I didn't understand your question. So, I have a question. What is that - post.addParameter? HttpPost don't have addParameter method as I know. On Fri, Jun 25, 2010 at 12:32 AM, Kumar Mettu <[email protected]> wrote: > Not sure I understand your solution. Can you explain? > > Kumar. > > > > > ________________________________ > From: John Smith <[email protected]> > To: HttpClient User Discussion <[email protected]> > Sent: Thursday, June 24, 2010 14:59:46 > Subject: Re: Preventing parameters from being encoded > > You can something lika that: > > byte[] params = yourParamsString.getBytes(); > postEntityParams = new ByteArrayEntity(params); > > On Thu, Jun 24, 2010 at 11:48 PM, Kumar Mettu <[email protected]> wrote: >> Hi, >> >> I am using Apache HTTP client POST method. >> When sending parameters to server in the post method, the paramters are >> encoded by Apache Client. For example the following message parameter >> post.addParameter("message", "my\"simple\" message"); >> is sent to server as >> my "simple" message. >> >> How do I prevent Apache HTTP client encoding the parameters? >> >> Thanks In Advance, >> >> Kumar. >> >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
