Skip to main content

Questions tagged [apache-httpclient-4.x]

A Java HTTP client library. Supersedes the Commons HttpClient project.

apache-httpclient-4.x
0 votes
0 answers
20 views

Stop callers from accidentally closing CloseableHttpClient

I am configuring a class to manage an Apache HttpClient that will be used application-wide for the lifetime of the application, like the following: public class HttpManager { private ...
EarthTurtle's user avatar
-3 votes
1 answer
47 views

Can the same HttpClient-using code compile against Spring-5.x and 6.x?

The following code compiles nicely against Spring-5.x: import org.apache.http.client.HttpClient; ... private static ClientHttpRequestFactory clientHttpRequestFactory( int timeOut) throws ...
Mikhail T.'s user avatar
  • 3,422
0 votes
1 answer
34 views

Difference between different timeouts for apache http client 5.1

With Apache Http client 5.1.x, I want to set timeout on every HTTP request(Get, Post, ..), as I don't want to wait for more than certain period for obvious reasons. But I'm confused mostly between ...
Swanand's user avatar
  • 131
0 votes
0 answers
25 views

Apache EntityUtils.toString() timeouts for big response

We have deployed our code in AWS lambda. I am using EntityUtils to get string response body. But it gets timeout for big json response string. Total characters in json response is 6266832 String ...
vishal's user avatar
  • 319
0 votes
3 answers
90 views

Apache HttpClient PoolingHttpClientConnectionManager - allocated to maximum

I have set up PoolingHttpClientConnectionManager (with ssl): private PoolingHttpClientConnectionManager getConnManager( Registry<ConnectionSocketFactory> socketFactoryRegistry) { ...
Tomas Secret's user avatar
0 votes
1 answer
45 views

How can I set the Bearer Token just before making a request using Apache Http Client 4

I still use Apache Http Client 4. But, I would like to set the Bearer Token just before making a request. Then, I have tried the following public class Test { public static void main(final String[]...
Suzuki Yuu's user avatar
1 vote
0 answers
42 views

Apache HTTP Client SSL via custom servername SNI

I have a Apache Async Http client which I use to connect to IP addresses (instead of domain name). I want to find a way to provide the SNI information, something like this so that the SSL handshake ...
abs060's user avatar
  • 11
0 votes
1 answer
87 views

WS02 APIM 4.1.0: High CPU Utilization over 100% and HTTP-Sender I/O dispatcher threads consuming %CPU

WSO2 APIM Server : 4.1.0 OpenJDK : 64-Bit Server VM (11.0.17+8-LTS mixed mode, sharing) Linux : RHEL 8.x CPU/Processor : 4 Memory : 8GB WSO2 APIM 4.1.0 running on OpenJDK 11 continues to shows 100% ...
anuu_online's user avatar
0 votes
1 answer
74 views

How can I migrate to apache httpclient5 about Zero Copy Get request

I am migrating to apache httpclient5 from apache httpclint 4. I use the Zero Copy Get request process as follows. https://svn.apache.org/viewvc/httpcomponents/httpasyncclient/branches/4.1.x/...
Suzuki Yuu's user avatar
0 votes
0 answers
49 views

Buffered Reader hangs for ~8 seconds while checking br.readLine() for the last time

I'm working on some Java 8 code (using Apache httpclient 4.3) to process out the content from an HTTP response. I am able to print out the content but on the last iteration of the while loop after the ...
Trevor Pastrami's user avatar
1 vote
1 answer
106 views

Is an IdleConnectionMonitorThread still recommended in Apache httpclient5?

I am updating an old project's dependencies. One of the transitive changes pulled in is a version bump of apache-httpclient from 4.5 to 5.2. This project implements the recommended ...
Patrick M's user avatar
  • 10.9k
0 votes
0 answers
10 views

Does Apache HttpClient V4 HttpMessage use header case-insensitive matching?

RFC spec states Http headers are case-insensitive: Are HTTP headers case-sensitive? In our source code we set headers in [org.apache.hc.core5.http.HttpMessage](https://github.com/apache/httpcomponents-...
Jae Lee's user avatar
0 votes
1 answer
392 views

required a bean of type 'org.apache.hc.client5.http.io.HttpClientConnectionManager' that could not be found

I want to migrate this apache http client code: import org.apache.http.conn.HttpClientConnectionManager; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.impl.client....
Peter Penzov's user avatar
  • 1,048
0 votes
0 answers
102 views

NoClassDefFoundError: org/apache/http/client/methods/HttpUriRequest using Spring Framework version 5.1.3 to support PATCH

I am working on a Spring application using Spring Framework version 5.1.3.RELEAS and Java 1.8 I need to make a PATCH request, but I understand that RestTemplate does not natively support PATCH methods....
abishkar bhattarai's user avatar
0 votes
0 answers
59 views

What happens when the response is not closed with Apache Connector in Jersey Client?

I run a Java web service at my workplace which uses JerseyClient to make HTTP requests. A few weeks ago we switched the default connector implementation with ApacheConnector and our server stopped ...
DashwoodIce9's user avatar

15 30 50 per page
1
2 3 4 5
157