hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michelle Harris <puig...@yahoo.com>
Subject params for POST
Date Fri, 10 Mar 2006 18:53:23 GMT
Hi,

I'm trying to access a server using POST. The server
keeps replying saying that I'm missing some
parameters. If I just write a simple html file and hit
submit, the request going over the wire looks like
this:

*************Start of request*************************
POST /acrolinx/acrocheckServlet/checkDocument HTTP/1.1

Accept: image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, application/x-shockwave-flash,
application/vnd.ms-excel,
application/vnd.ms-powerpoint, application/msword, */*

Accept-Language: en-us

Content-Type: multipart/form-data;
boundary=---------------------------7d6898a02a6

Accept-Encoding: gzip, deflate

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows
NT 5.1; SV1; .NET CLR 1.1.4322)

Host: 127.0.0.1:8091

Content-Length: 23385

Connection: Keep-Alive

Cache-Control: no-cache




-----------------------------7d6898a02a6

Content-Disposition: form-data; name="client_name"



acrocheck thin html client

-----------------------------7d6898a02a6

Content-Disposition: form-data; name="client_locale"



en


Content-Type: text/xml



<document>some xml text in a document</document>

*************Stop of request*************************

But...if I use HTTP client setting all the parameters
as request parameters and the text of the document in
httppost.setRequestEntity(new
ByteArrayRequestEntity(documentAsString.getBytes()));

Then of course, none of the request parameters get
sent to the server.

So I *then* tried sending the paramters over as a
query string. The server didn't like that either. Does
anyone know what I'm supposed to do to get my request
to look as the one above does?

Many thanks,
Michelle


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


Mime
View raw message