Why a New HTTP Client? HttpURLConnection — Java’s HTTP API since Java 1.1 — has deep design problems: Mutable shared state makes it error-prone in multithreaded code No built-in HTTP/2 support No built-in async; non-blocking requires manual thread management Clunky API: setDoOutput(true), getOutputStream(), connect() in sequence No support for reactive streams JEP 321 (Java 11) standardised the HTTP Client API that was incubating since Java 9. The new API lives in java.
Continue reading »Rest
1 post in this section