Skip to main content

Questions tagged [apache-httpcomponents]

A Java library for interacting with HTTP services.

apache-httpcomponents
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
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 ...
rubenv's user avatar
  • 13
0 votes
1 answer
31 views

account not found when requesting oauth2 token from google cloud

Status Code: HTTP/1.1 400 Bad Request Response: {"error":"invalid_grant","error_description":"Invalid grant: account not found"} I am using a service account ...
Scott MacDonald's user avatar
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
176 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 ...
Shuvradeb Saha's user avatar
1 vote
1 answer
198 views

Apache HttpClient5 - How to set LocalAddress per-request?

I'm migrating Apache httpclient from 4.5 to 5.3 and my app currently chooses from a set of local IPs dynamically. Example code: HttpGet request = new HttpGet(url); request.setRequestConfig(...
Petar Petrov's user avatar
8 votes
0 answers
2k views

Best way to configure timeouts on Apache HttpClient 5

I'm trying to understand the difference between the various timeout configurations in HttpClient and the simplest way to configure it. The various options are shown in this code: RequestConfig ...
David Geary's user avatar
  • 2,054
0 votes
0 answers
24 views

Error while writing file to Amazon S3 bucket NoSuchFieldERROR INSTANCE

AmazonS3 s3Client = new AmazonS3Client(); try { ByteArrayInputStream dataStream = new ByteArrayInputStream(barry); ObjectMetadata obkmeta = new ...
Sachin Singh's user avatar
0 votes
1 answer
170 views

What is the difference between I/O Reactor Config ioThreadCount and PoolingAsyncClientConnectionManager maxConnTotal?

Following up on my previous question here: What is the difference between different apache-httpclient5 setup config provided by Apache HttpClient 5? I/O Reactor Config is the lowest level of config (...
contemplator's user avatar
0 votes
1 answer
614 views

What is the difference between different apache-httpclient5 setup config provided by Apache HttpClient 5?

There are bunch of config provided by Apache HttpClient5 to modify how you use the client. But, these seems to be the most important: RequestConfig, and CloseableHttpAsyncClient, which includes ...
contemplator's user avatar
0 votes
1 answer
239 views

Apache client http5 override body & content-length problem

Prior to http5, i use HttpRequestInterceptor to override Entity, to sign request, ect ... with apache thrif calls (to evict override Thttpclient from libthrift) With http5, interceptor have a new ...
Scrat's user avatar
  • 1
1 vote
1 answer
385 views

How to configure Apache HttpClient logger?

I am using RestAssured 5.3.0 and I want to log the low level http requests/responses. The RequestLoggingFilter docs say: ... If you need to log what's actually sent on the wire refer to the HTTP ...
Georgi Georgiev's user avatar
0 votes
0 answers
292 views

How to instrument outgoing http requests with AWS Xray for Java Spring Boot 3.1 app?

I am in the process of migrating a java web application from Spring Boot 2.6 to 3.1. Previously, I was using the aws-xray-recorder-sdk-apache-http module to instrument the Apache HttpClient4 client ...
Brett Richards's user avatar
1 vote
1 answer
362 views

How to retry HttpClient request on TunnelRefusedException?

I would like HttpClient 5 to retry requests when facing a TunnelRefusedException (it happens randomly that the proxy refuses the initial connection, but it usually works ok when retrying). I have ...
Óscar's user avatar
  • 710
2 votes
1 answer
910 views

How to set proxy for individual requests in Apache HttpClient 5?

I would like to configure an HTTP proxy for some individual requests and not for others, using Apache HttpClient 5. However it looks like RequestConfig.Builder.setProxy() is deprecated. The javadoc ...
Óscar's user avatar
  • 710

15 30 50 per page
1
2 3 4 5
38