Questions tagged [apache-commons-httpclient]

The HttpClient v3.x (or older) library from the Apache Commons project

For questions releated to the newer Apache HttpClient v4.x library, see

536 questions
-1
votes
2 answers

HttpClient vs HttpClientModule as parameters in Angular components

Trying to use this article (among others) to get my first Angular program to run. I am trying to get my service to use HttpClient, but neither passing in the interface to my new service, an instance of HttpClient to the service's constructor, nor…
Dr Dave
  • 550
  • 1
  • 6
  • 22
-1
votes
1 answer

What effect does HttpResponse#close( ) have on BasicHttpClientConnectionManager?

I read on the Apache HttpClients tutorial that HttpResponse#close() shuts down and discards the connection. My question is when we use a BasicHttpClientConnectionManager which only manages a single connection, I call HttpResponse#close() will I not…
-1
votes
1 answer

How to pass multipart file along with file name to post method using Apache httpclient 3.x?

service code: @RequestMapping(value="/uploadFile", method=RequestMethod.POST, consumes = "multipart/form-data") public String uploadFile(@RequestParam("file") MultipartFile file,@RequestParam("filePath") String filePath){ //logic here } Part of…
-1
votes
1 answer

How to avoid calling ChunkedInputStream.exhaustInputStream(this) in commons-httpclient

I have a scene to random access http resources by adding header "Range:bytes=a-", I know the a value for the http request but have no idea about the end boundary. So... http request send and a response stream returned. when I have read the…
Mr rain
  • 983
  • 5
  • 13
  • 27
-1
votes
1 answer

How to send Cookie with HttpGet Url?

I am trying to send Cookie with HttpGet Url. which receive from my service(call by HttpGet), for Authentication. I send it with Url but every time get error message. like:"User must be Authentificated". I get following error. 05-15 10:28:17.623:…
Mr.Sandy
  • 4,299
  • 3
  • 31
  • 54
-1
votes
1 answer

When sending via Commons HttpPost, how do I encode my NameValue pairs to be UTF-8?

I have an HttpPost that's been working well for a couple of years but I just discovered that it's failing to deliver certain characters (I can see that the params look right on the client right before they head off to the server and I can see that…
Yevgeny Simkin
  • 27,946
  • 39
  • 137
  • 236
-1
votes
1 answer

Download url in to directory

I need a download a text/plain file in to a folder. The url does not end with .txt but it has content-type etc... properly set. When I use the browser it immediately prompts me to save the file. The browser automatically puts proper file name also.…
anony
  • 314
  • 2
  • 14
-2
votes
3 answers

TLS upgrade, Stackoverflow error while using CustomHttpsSocketFactory

Using this link tried to upgrade to TLSv1.2. The only difference was to support all TLS till now so used this : sslSocket.setEnabledProtocols(new String[]{"TLSv1","TLSv1.1","TLSv1.2"}); The peculiar thing was to get this error…
Danyal
  • 448
  • 4
  • 18
-2
votes
1 answer

how to read a multipart/mixed response from xquery in java using httpclient?

I want to read a multipart/mixed content-type response returned from xquery in java. I am using http client in java to call/execute the xquery. In java i can able to get only the response body as string or stream or byte content. I want to separate…
-4
votes
2 answers

What timeout set for apache http client?

I'm using apache http client import org.apache.http.impl.client.DefaultHttpClient; //... my_httpParams = new BasicHttpParams(); HttpConnectionParams.setConnectionTimeout(my_httpParams, 300); HttpConnectionParams.setSoTimeout(my_httpParams,…
Marian Paździoch
  • 8,813
  • 10
  • 58
  • 103
1 2 3
35
36