Closed argherna closed 3 years ago
I don't think there's any way to do this. The HttpURLConnection is a great API and all, and I think that Jttp 1.0 demonstrates how to use it effectively, but I can't win this one because the APIs that HttpURLConnection rely on go too deep into the JDK to be reached and influenced externally.
HttpURLConnection hardcodes the HTTP methods it supports and throws exceptions for others [1]. I'd like to see if there is a way from Java 9 onward to support PATCH and WebDAV while maintaining the integrity of using HttpURLConnection as much as possible.