Open 21aslade opened 1 week ago
@21aslade Thank you for submitting this issue! Thank you for concisely summing up the problem and proposing a meaningful solution. You've done an amazing job providing links to our prior efforts to address the issue.
Additional research confirms that this proposal is legit. See the related resources:
Personally, I like the upgrade approach a lot more than our previous attempts. I would love to see a PR that performs the upgrade. Recognizing that I have no actual authority, you may choose to wait for a more meaningful approval from @leesjensen or @jerodw.
Love it! We just need to update the following:
Totally worth doing though. I thought I remembered an easier way to do client requests in Java!
@rodham @jerodw - what do you think?
Currently, PetShop's
ServerFacade
usesHttpURLConnection
to make requests.HttpURLConnection
's API is rather unintuitive and bulky, and JDK 11 providedHttpClient
as a replacement.Switching to
HttpClient
makes the requests simpler and more representative of a modern approach to http. It would also close #157, #160, and #163, asHttpClient
's api does not differentiate between the input stream and the error stream.I'm happy to provide the code/docs changes! They're all relatively simple. I just wanted to make an issue before making a PR to give some heads up.