Questions tagged [apache-httpclient-5.x]

109 questions
9
votes
1 answer

How to ignore SSL certificate errors in Apache HttpComponents HttpClient 5.1

How do I bypass certificate verification errors with Apache HttpComponents HttpClient 5.1? I've found a working solution to bypass such errors in HttpClient 4.5 that suggests customizing HttpClient instance: HttpClient httpClient = HttpClients …
Yang Hanlin
  • 474
  • 1
  • 6
  • 18
8
votes
3 answers

Unable to authenticate with apache http client 4.5 using kerberos ticket cache

I am executing an https request to a kerberos authenticated REST service. All is fine if I am using the keytab. However, I have a requirement that I should use the kerberos ticket cache file which is created when one logs in in the workstation using…
7
votes
0 answers

HttpClient5 - Lot of APIs changed / removed

I'm migrating my application to use HttpClient5 but its becoming miserable day by day. Many APIs removed and no proper documentation available to know alternatives. Stackoverflow/any other website/blogs always shows about answers related to…
6
votes
2 answers

How to create Spring WebClient from Apache Http Client

I want to create WebClient from HttpComponent's org.apache.http.client.HttpClient to use it in async operations.Any idea on how to do it
5
votes
1 answer

How to follow redirects for POST in Apache HttpClient 5.1

I'm looking how to follow redirects for POST requests as POST in Apache HttpClient 5.1 By default, only GET requests resulting in a redirect are automatically followed. If a POST requests is answered with either HTTP 301 (Moved Permanently) or with…
curd0
  • 2,300
  • 3
  • 27
  • 32
4
votes
0 answers

How to prevent RestHighLevelClient from blacklisting the Host?

I am using Elasticsearch client version 7.15.2 here is my Pom.xml org.elasticsearch elasticsearch 7.15.2
badger
  • 2,908
  • 1
  • 13
  • 32
4
votes
1 answer

How to do Http2 correctly with Apache HttpCient-5 Beta

HI I m trying to write a client that makes http2 request to multiple servers(which already supports http2). so far I have written this standalone program which works fine that I can see all requests goes via same tcp connection(verified with the…
3
votes
1 answer

HttpClient migration from 3.x to 5.x - Need info on support plan

We are planning to migrate our old legacy code which uses commons-httpclient-3.x to httpclient5.x . But found that its going to be complete rewrite as lot of classes/packages removed. Tried migrating to httpclient4.x , seems to be having lesser…
3
votes
0 answers

IOReactorShutdownException: I/O reactor has been shut down, using apache httpclient5

we recently upgraded our httpclient version from 4.x to 5.0.3. The main reason for the upgrade is to get rid of the java.lang.IllegalStateException: Request cannot be executed; I/O reactor status: STOPPED exception that accures on version 4.x. After…
3
votes
0 answers

Migration from HTTPAsyncClient to HTTPClient5 - Replacement for PoolingNHttpClientConnectionManager? and how to set Socket timeout on RequestConfig?

I am migrating from HTTPAsyncCLient to HTTPCLient5 to make use of the HTTP/2 support that comes with it. We used to use PoolingNHttpClientConnectionManager as our connection manager but it is no longer available. I was wondering what the best…
3
votes
1 answer

Implement HttpRequestRetryHandler and RequestBuilder in httpclient5

I plan to update my project to use httpclient5. After that I recognized in httpclient5 (5.0, 5.01 and 5.0.2), they don't have the class HttPRequestRetryHandler and RequestBuilder anymore. Is there any way or update to not use these class in http5,…
Thanh Huy Le
  • 89
  • 1
  • 8
3
votes
1 answer

Conscrypt with jdk8 to enable ALPN for http2

I have been searching how to implement Conscrypt SSL provider using conscrypt-openjdk-uber-1.4.1.jar for jdk8 to support ALPN for making a http2(using apache httpclient 5) connection to a server as jdk8 does not support ALPN by default or the other…
Zyber
  • 428
  • 4
  • 21
2
votes
2 answers

httpclient5 with connection pooling in java

I am trying to use httpclient5 with connection pooling. Below are some of the points mentioned in documentation: CloseableHttpClient instances should be closed when no longer needed or about to go out of score. IMPORTANT: Always re-use…
ketan
  • 23
  • 3
2
votes
2 answers

How to replace a response entity within an interceptor in Apache Http Client 5?

We have legacy code using Apache Http Client 4 that replaces a response entity from within a response interceptor: public class GzipResponseInterceptor implements HttpResponseInterceptor { @Override public void process(HttpResponse response,…
SPU42
  • 31
  • 3
2
votes
2 answers

"Package org.apache.hc.httpclient5.conn.ssl does not exist" on Spring Boot upgrade

I had to upgrade the Spring Boot dependency 2.7.5 --> 3.0.2: org.springframework.boot spring-boot-starter-parent 3.0.2 The pom.xml…
gene b.
  • 10,512
  • 21
  • 115
  • 227
1
2 3 4 5 6 7 8