Fix deprecation warnings

See gh-27383
This commit is contained in:
Andy Wilkinson 2021-07-19 11:53:58 +01:00
parent ac668dd813
commit 8259f15451

View File

@ -19,8 +19,8 @@ package smoketest.jetty10;
import javax.net.ssl.SSLContext;
import org.apache.hc.client5.http.async.methods.SimpleHttpRequest;
import org.apache.hc.client5.http.async.methods.SimpleHttpRequests;
import org.apache.hc.client5.http.async.methods.SimpleHttpResponse;
import org.apache.hc.client5.http.async.methods.SimpleRequestBuilder;
import org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient;
import org.apache.hc.client5.http.impl.async.HttpAsyncClients;
import org.apache.hc.client5.http.ssl.ClientTlsStrategyBuilder;
@ -61,7 +61,7 @@ public class Jetty10Http2OverTlsTests {
try (CloseableHttpAsyncClient http2Client = HttpAsyncClients.customHttp2().setTlsStrategy(tlsStrategy)
.build()) {
http2Client.start();
SimpleHttpRequest request = SimpleHttpRequests.get("https://localhost:" + this.port);
SimpleHttpRequest request = SimpleRequestBuilder.get("https://localhost:" + this.port).build();
request.setBody("Hello World", ContentType.TEXT_PLAIN);
SimpleHttpResponse response = http2Client.execute(request, new FutureCallback<SimpleHttpResponse>() {