On Tue, 12 Mar 2024 16:18:15 GMT, Daniel Fuchs <[email protected]> wrote:
>> Michael McMahon has updated the pull request incrementally with one >> additional commit since the last revision: >> >> update Daniel review > > src/java.net.http/share/classes/java/net/http/HttpResponse.java line 153: > >> 151: * @return an Optional containing the response body if the >> predicate returns true >> 152: */ >> 153: public Optional<T> bodyWhen(Predicate<ResponseInfo> predicate) >> throws IOException; > > This is a neat idea which will allow to append additional steps like > `.orElseThrows(...)` etc... I wonder if it should be a `Predicate<HttpResponse>` instead? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18227#discussion_r1521769849
