Questions tagged [apache-httpclient-5.x]
The apache-httpclient-5.x tag has no usage guidance.
apache-httpclient-5.x
156
questions
-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 ...
0
votes
1
answer
20
views
Is there still anyway to get audit logs from DefaultConnectingIOReactor in httpclient5?
Abstract
I'm now switching my project denpendency apache-http-component 4 to 5.2 and there are lots of api has changed or removed. And I can't find any useful migration guide for me (even this one ...
0
votes
1
answer
25
views
Is there any way to get Headers from HttpResponse in HttpClient5?
In Apache HTTP Components 4, I could get Header[] from HttpResponse by using the method getAllHeaders(), cause this method extends from class HttpMessage. However, after upgrading my dependency to 5.x,...
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 ...
1
vote
1
answer
105
views
CloseableHttpAsyncClient does not send fatal TLS alerts before closing connection
I'm trying to get Apache httpclient5 CloseableHttpAsyncClient to correctly send fatal TLS alerts in case of failures that close the connection. According to the TLS v1.2 protocol, "Whenever an ...
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[]...
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/...
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 ...
0
votes
0
answers
74
views
Apache httpclient5 - NoHttpResponseException: failed to respond
Sometimes the request failed with failed to respond
Caused by: org.apache.hc.core5.http.NoHttpResponseException: <host> failed to respond
at org.apache.hc.core5.http.impl.io....
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....
0
votes
1
answer
661
views
Get Request with Body using RestTemplate in Spring Boot 3
I want to send a GET request with a request body in Spring Boot 3 via RestTemplate
Note - Using exchange(URI, HttpMethod.GET, HttpEntity(with_the_body_set), ...) by itself does not work
Most resources ...
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....
0
votes
1
answer
177
views
Is it possible to intercept request body send via the apache httpcomponents client5?
I am using OpenSearchClient which uses the apache https client5 internally to communicate with the opensearch server. I need to intercept the search request that is sent from the application to the ...
0
votes
0
answers
168
views
Spring WebClient with Apache HTTP client 5 causing memory leak
We've recently upgraded our Spring Boot application and have switched to Spring's new WebClient. On undeploy of the webapp, we see a 'idle-connection-evictor' thread as a memory leak, preventing the ...
0
votes
0
answers
126
views
very few responses finally DeadlineTimeoutException with httpcomponents-client-5.2.x
I am using https://hc.apache.org/httpcomponents-client-5.2.x/5.2.3/
org.apache.httpcomponents.client5:httpclient5:5.2.3
to make REST API calls which require high throughput.
Java version: 17.0.8, ...