mirror of
https://github.com/jlengrand/vert.x.git
synced 2026-04-04 00:41:23 +00:00
HttpClient can use SSL/TLS per request - fixes #1796
This commit is contained in:
@@ -735,4 +735,14 @@ public class HTTPExamples {
|
||||
});
|
||||
}
|
||||
|
||||
public void setSSLPerRequest(HttpClient client) {
|
||||
client.getNow(new RequestOptions()
|
||||
.setHost("localhost")
|
||||
.setPort(8080)
|
||||
.setURI("/")
|
||||
.setSsl(true), response -> {
|
||||
System.out.println("Received response with status code " + response.statusCode());
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user