Class TracedHttpClient
java.lang.Object
org.openqa.selenium.remote.tracing.TracedHttpClient
- All Implemented Interfaces:
Closeable,AutoCloseable,HttpClient,HttpHandler
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()execute(HttpRequest req) openSocket(HttpRequest request, WebSocket.Listener listener) <T> CompletableFuture<HttpResponse<T>> sendAsyncNative(HttpRequest request, HttpResponse.BodyHandler<T> handler) Sends an HTTP request using java.net.http.HttpClient and allows specifying the BodyHandler.<T> HttpResponse<T> sendNative(HttpRequest request, HttpResponse.BodyHandler<T> handler) Sends an HTTP request using java.net.http.HttpClient and allows specifying the BodyHandler.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openqa.selenium.remote.http.HttpClient
executeAsyncMethods inherited from interface org.openqa.selenium.remote.http.HttpHandler
with
-
Method Details
-
openSocket
- Specified by:
openSocketin interfaceHttpClient
-
execute
- Specified by:
executein interfaceHttpHandler
-
sendAsyncNative
public <T> CompletableFuture<HttpResponse<T>> sendAsyncNative(HttpRequest request, HttpResponse.BodyHandler<T> handler) Description copied from interface:HttpClientSends an HTTP request using java.net.http.HttpClient and allows specifying the BodyHandler.- Specified by:
sendAsyncNativein interfaceHttpClient- Type Parameters:
T- the response body type- Parameters:
request- the HTTP request to sendhandler- the BodyHandler that determines how to handle the response body- Returns:
- a CompletableFuture containing the HTTP response
-
sendNative
public <T> HttpResponse<T> sendNative(HttpRequest request, HttpResponse.BodyHandler<T> handler) throws IOException, InterruptedException Description copied from interface:HttpClientSends an HTTP request using java.net.http.HttpClient and allows specifying the BodyHandler.- Specified by:
sendNativein interfaceHttpClient- Type Parameters:
T- the response body type- Parameters:
request- the HTTP request to sendhandler- the BodyHandler that determines how to handle the response body- Returns:
- the HTTP response
- Throws:
IOException- if an I/O error occursInterruptedException- if the operation is interrupted
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceHttpClient
-