RFR: 8331195: Improve com.sun.net.httpserver.HttpExchange usability [v3]

robert engels duke at openjdk.org
Wed May 1 13:28:54 UTC 2024


On Fri, 26 Apr 2024 15:37:13 GMT, robert engels <duke at openjdk.org> wrote:

>> improve the HttpExchange api with documented constants and convenience methods to avoid common bugs
>
> robert engels has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpExchange.java
>   
>   Co-authored-by: Michael McMahon <70538289+Michael-Mc-Mahon at users.noreply.github.com>

I think the disconnect is that the user of the API needs to understand the HTTP protocol (and its limitations) to use it properly.

You could hide a lot of this by using ResponseHandlers etc - and try and do it behind the scenes - like HttpClient does - but it leads to a much more complex api (imo) and the code as well.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/18955#issuecomment-2088458280


More information about the net-dev mailing list