public interface ProxyHttpClient
Modifier and Type | Method and Description |
---|---|
static ProxyHttpClient |
create(URL url)
Create a new
ProxyHttpClient . |
static ProxyHttpClient |
create(URL url,
HttpClientConfiguration configuration)
Create a new
ProxyHttpClient with the specified configuration. |
Publisher<MutableHttpResponse<?>> |
proxy(HttpRequest<?> request)
Proxy the given request and emit the response.
|
Publisher<MutableHttpResponse<?>> proxy(@NonNull HttpRequest<?> request)
request
- The requeststatic ProxyHttpClient create(@Nullable URL url)
ProxyHttpClient
.
Note that this method should only be used outside of the context of a Micronaut application.
The returned ProxyHttpClient
is not subject to dependency injection.
The creator is responsible for closing the client to avoid leaking connections.
Within a Micronaut application use Inject
to inject a client instead.url
- The base URLstatic ProxyHttpClient create(@Nullable URL url, @NonNull HttpClientConfiguration configuration)
ProxyHttpClient
with the specified configuration. Note that this method should only be used
outside of the context of an application. Within Micronaut use Inject
to inject a client insteadurl
- The base URLconfiguration
- the client configuration