argherna / jttp

Basically httpie, but in Java
Apache License 2.0
2 stars 1 forks source link

Support client side custom HTTP methods #2

Closed argherna closed 3 years ago

argherna commented 4 years ago

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.

argherna commented 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.