C
- - unused context; synchronous clients handle context internallypublic static class AsyncClient.Pseudo<C> extends Object implements AsyncClient<C>
AsyncClient
AsyncClient.Default<C>, AsyncClient.Pseudo<C>
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Response> |
execute(Request request,
Request.Options options,
Optional<C> requestContext)
Executes the request asynchronously.
|
public Pseudo(Client client)
public CompletableFuture<Response> execute(Request request, Request.Options options, Optional<C> requestContext)
AsyncClient
CompletableFuture.cancel(boolean)
on the
result may cause the execution to be cancelled / aborted, but this is not guaranteed.execute
in interface AsyncClient<C>
request
- safe to replayoptions
- options to apply to this requestrequestContext
- - the optional context, for example for storing session cookies. The
client should update this appropriately based on the received response before completing
the result.CompletableFuture
to be completed with the response, or completed
exceptionally otherwise, for example with an IOException
on a network
error connecting to Request.url()
.Copyright © 2012–2020 OpenFeign. All rights reserved.