test/jdk/java/net/httpclient/ProxyAuthTest.java
branchhttp-client-branch
changeset 56082 1da51fab3032
parent 48083 b1c1b4ef4be2
child 56089 42208b2f224e
equal deleted inserted replaced
56081:20c6742e5545 56082:1da51fab3032
    74             HttpClient client = HttpClient.newBuilder()
    74             HttpClient client = HttpClient.newBuilder()
    75                                           .proxy(ps)
    75                                           .proxy(ps)
    76                                           .authenticator(auth)
    76                                           .authenticator(auth)
    77                                           .build();
    77                                           .build();
    78             HttpRequest req = HttpRequest.newBuilder(uri).GET().build();
    78             HttpRequest req = HttpRequest.newBuilder(uri).GET().build();
    79             HttpResponse<?> resp = client.sendAsync(req, discard(null)).get();
    79             HttpResponse<?> resp = client.sendAsync(req, discard()).get();
    80             if (resp.statusCode() != 404) {
    80             if (resp.statusCode() != 404) {
    81                 throw new RuntimeException("Unexpected status code: " + resp.statusCode());
    81                 throw new RuntimeException("Unexpected status code: " + resp.statusCode());
    82             }
    82             }
    83 
    83 
    84             if (auth.isCalled) {
    84             if (auth.isCalled) {