Listened to the recent #InsideJava podcast over the weekend on networking in the JDK: reactive HTTP/2, refactoring for Loom, Unix domain sockets, HTTP/3, etc. Here's the TLDL. 🧵 (To listen: inside.java/2021/04/12/pod… and on many platforms, e.g. open.spotify.com/episode/0esLDs…) 1/10
Starts off with a recap of URLConnection: * around since 1.1 * handles all kinds of URLs * first use case was to implement a browser Downsides: * blocking * undocumented behaviors * too many abstractions * too little HTTP-specific options, like proxying and redirection 2/10
That's why we got a new API in #Java11: * HTTP/1.1 and 2 * synchronous and asynchronous * handles requests and responses as reactive streams * deliberately small API using builders * reusable clients and immutable requests More: nipafx.dev/java-http-2-ap… 3/10