Hello, I have a java script running for some actions, using the available api, but a few weeks ago my requests have sometimes and only sometimes returned the error “HTTP/1.1 header parser received no bytes”. I’ve had this script for some time now and it always worked.
Hello Marko. Thank you for the answer and sorry for taking so long to reply.
I changed the http version to 1.1 and the same problem is still happening. The weirdest part is that sometimes the calls work, and sometimes the same calls don’t.
Also, make sure you have Java 11 or later on your machine installed, and try again.
Before that, using the current config, before opening any connection, try setting this: System.setProperty(“https.protocols”, “TLSv1.2”)
This forces the Java runtime to use TLS version 1.2 for all HTTPS connections in that JVM session.
Some older Java runtimes default to older TLS versions (like 1.0 or 1.1), which modern APIs reject or drop silently, which might cause the present error.