The HttpParams
values that are included in a new DefaultHttpClient
contain some basic headers (like user agent and protocol version), while a brand new BasicHttpParams
is completely empty.
http.protocol.expect-continue=false,
http.protocol.version=HTTP/1.1,
http.protocol.content-charset=ISO-8859-1,
http.useragent=Apache-HttpClient/UNAVAILABLE (java 1.4)
Your server is probably expecting at least some of them, hence the "bad request" response.
If you need to add custom parameters, you should start with httpClient.getParams()
and build them from there.