public class Flux extends Object
| Constructor and Description |
|---|
Flux() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addDefaultHeader(String key,
String value)
Added default headers will always be send, can still be overriden using the builder.
|
static void |
clearDefaultHeader()
Removes all default http-headers
|
static void |
clearTimeouts()
Clears all default timeouts
|
protected static FluentHttpClient |
createClient() |
protected static Supplier<HttpClient> |
createDefaultHttpClientSupplier() |
static FluentHttpClient.HttpBuilder |
request(String resource)
Specifies the resource to be requested.
|
static FluentHttpClient.HttpBuilder |
request(String protocol,
String host,
Integer port,
String path)
Specifies the resource to be requested.
|
static FluentHttpClient.HttpBuilder |
request(URL resource)
Specifies the resource to be requested.
|
static void |
resetHttpClientFactory() |
static void |
setDefaultTimeout(long timeout)
If no timeout is passed via the builder, a default timeout can be set for read and connection timeouts with this
method for further requests.
|
static void |
setDefaultTimeout(String timeout)
If no timeout is passed via the builder, a default timeout can be set for read and connection timeouts with this
method for further requests.
|
static void |
setDefaultTimeoutConnection(long timeoutConnection)
If no connection timeout is passed via the builder, a default connection timeout can be set with this method for
further requests.
|
static void |
setDefaultTimeoutConnection(String timeoutConnection)
If no connection timeout is passed via the builder, a default connection timeout can be set with this method for
further requests.
|
static void |
setDefaultTimeoutRead(long timeoutRead)
If no read timeout is passed via the builder, a default read timeout can be set with this method for further
requests.
|
static void |
setDefaultTimeoutRead(String timeoutRead)
If no read timeout is passed via the builder, a default read timeout can be set with this method for further
requests.
|
static void |
setHttpClientFactory(Supplier<HttpClient> clientFactory) |
public static void setDefaultTimeout(long timeout)
timeout - Timeout in millisecondspublic static void setDefaultTimeout(String timeout)
timeout - Timeout in human time.public static void setDefaultTimeoutConnection(long timeoutConnection)
timeoutConnection - Connection timeout in millisecondspublic static void setDefaultTimeoutConnection(String timeoutConnection)
timeoutConnection - Connection timeout in human time.public static void setDefaultTimeoutRead(long timeoutRead)
timeoutRead - Read timeout in millisecondspublic static void setDefaultTimeoutRead(String timeoutRead)
timeoutRead - Read timeout in human time.public static void clearTimeouts()
public static void addDefaultHeader(String key, String value)
public static void clearDefaultHeader()
public static FluentHttpClient.HttpBuilder request(String resource)
resource - The URL to request, including protocol.public static FluentHttpClient.HttpBuilder request(URL resource)
resource - The URL to request.public static FluentHttpClient.HttpBuilder request(String protocol, String host, Integer port, String path)
protocol - Protocol of the resourcehost - Host of the resourceport - Port the host is listening onpath - Path for the resourceprotected static FluentHttpClient createClient()
public static void setHttpClientFactory(Supplier<HttpClient> clientFactory)
public static void resetHttpClientFactory()
protected static Supplier<HttpClient> createDefaultHttpClientSupplier()
Copyright © 2017. All rights reserved.