Skip to main content
0 votes
1 answer
64 views

java java.net.http.HttpClient returns http status 403 while curl works fine

I'm trying to fetch a json string from a (GraphQL ?) server. The input is a json string + POST request and the ouput is a json document. When using curl, it works (well , let's be honest it works if ...
Pierre's user avatar
  • 35.3k
3 votes
0 answers
65 views

How do I get the Java11+ HttpClient to drop the Authorization header when following redirects?

I'm using an API which, for certain large queries, returns a 307 status code and redirects me to a signed AWS S3 URL. I'm querying it with Java's inbuilt HttpClient (java.net.http.HttpClient), and the ...
Rebecca R's user avatar
0 votes
1 answer
75 views

HttpClient in Micronaut doesn't reuse thread

I've found that my Java Micronaut application, which essentially makes a blocking HTTP-call, handles low load well. But if the amount of requests increase, the application falls in a patter that looks ...
Simon's user avatar
  • 65
1 vote
0 answers
58 views

Apache Jena 4.9.0 [Endpoint returned Content-Type: application/sparql-results+json which is not recognized for SELECT queries.]

I'm developing a tool based on Apache Jena 4.9.0 libraries to issue SELECT queries to a SPARQL endpoint, and execution resulted in error stated at the title (that is, "Endpoint returned Content-...
Yasunori's user avatar
0 votes
1 answer
85 views

IOException while streaming file from HTTP response into HTTP request

I'm currently writing a program that has to fetch files from one API and send them to another one. I thought it would be nice to just take the byte stream and stream it directly from the response into ...
xtay2's user avatar
  • 817
0 votes
0 answers
75 views

Which Java 11+ HttpClient BodyHandler return chunks as they arrive?

I want to get data from a server that sends chunked data, in my case line by line. I checked this answer suggesting a custom BodySubscriber, as well as this one resorting to an InputStream. My current ...
stwissel's user avatar
  • 20.4k
2 votes
3 answers
529 views

Mutual TLS connection from OpenLiberty with custom keystore

I'm trying to use configured host-specific outbound SSL configuration in OpenLiberty to make an https connection to a remote system (Apple Pay, in this case, but I don't think relevant). I know the ...
Doug Breaux's user avatar
  • 5,105
0 votes
1 answer
229 views

Java 17 HttpClient- socket keepalive

Apache's HttpClient provides mechanism to keep the socket alive. SocketConfig socketConfig = SocketConfig.custom().setSoKeepAlive(true).build(); new PoolingHttpClientConnectionManager()....
forumUsr's user avatar
1 vote
0 answers
167 views

Using Java HTTP client, process individual parts of an HTTP multipart response as they arrive

I'm creating a client-server application where an HTTP 1.1 server sends an arbitrary number of binary packets to the client in a single HTTP response. The size of a response body may be as large as ...
Bass's user avatar
  • 5,368
1 vote
0 answers
416 views

Idea Http Client - Reusing Requests

I'm interested in starting to use the Idea Http Client for API testing. I'm currently facing a challenge. I have a set of requests or a sequence of requests that I would like to execute within other ...
thevasssa's user avatar
2 votes
1 answer
497 views

Is there a way to make keep-alive setting specific to one instance of java.net.http.HttpClient

I know you can set keep-alive by using System property jdk.httpclient.keepalive.timeout, and this value is only read once when the class jdk.internal.net.http.ConnectionPool is loaded. Afterwards, it ...
Patrick's user avatar
  • 377
1 vote
0 answers
136 views

Is there a way to read HTTP trailers with the Java 11 HttpClient?

Currently using the Java 11 HttpClient to make http requests and it appears there isn't an obvious way to read response trailers. These responses are streamed back to the client - the Java 11 ...
LooneyTuunz's user avatar
3 votes
1 answer
869 views

Java 17 HttpClient: Multiple IP addresses for a single hostname

We ran into same similar issue like: Java 11/17 HttpClient - How to try several IPs behind one hostname? We have a Linux box that has localhost IP address (127.XX.XX.XX) followed by the internal IP ...
forumUsr's user avatar
1 vote
1 answer
86 views

Jena 4 connection to Virtuoso

How can I access authenticated Virtuoso OpenSource SPARQL 1.1. graph store protocol through Jena 4? I am facing this problem after having upgraded my codebase from Jena 3 (Apache HttpClient) to Jena 4 ...
Petr Křemen's user avatar
0 votes
1 answer
669 views

How to translate HttpResponse JSON to Java 17 record directly

I am sending a HTTP REST GET request to an API with standard Java 17 like this : HttpResponse<String> response = httpClient.send(request, BodyHandlers.ofString()); and I can see the with ...
Stanislav Ivanov's user avatar

15 30 50 per page
1
2 3 4 5
15