Package dev.gmitch215.bytebox.net.http
Class HttpClient.Builder
java.lang.Object
dev.gmitch215.bytebox.net.http.HttpClient.Builder
- Enclosing class:
HttpClient
Assembles a client.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns the client.connectTimeout(Duration timeout) How long a connection may take to establish.followRedirects(HttpClient.Redirect redirect) What to do with a redirect.version(HttpClient.Version version) Which version to ask for, which the platform ignores because it negotiates its own.
-
Method Details
-
followRedirects
What to do with a redirect.- Parameters:
redirect- the policy- Returns:
- this builder
-
connectTimeout
How long a connection may take to establish.- Parameters:
timeout- the limit- Returns:
- this builder
-
version
Which version to ask for, which the platform ignores because it negotiates its own.- Parameters:
version- ignored- Returns:
- this builder
-
build
Returns the client.- Returns:
- the client
-