system.net.httpClient() causes java.io.IOException while system.net.httpGet() works fine

httpClient is using HTTP/2, which the target server is apparently not accepting and apparently not negotiating correctly. Unfortunately, the solution (telling HttpClient to only use HTTP/1) is not currently viable due to a bug:

Until that bug is fixed, you'll likely have to keep using httpGet.

2 Likes