Interface SyncOrAsync<ResponseContent>
- All Known Subinterfaces:
SyncOrAsyncOrStreaming<ResponseContent>
public interface SyncOrAsync<ResponseContent>
-
Method Summary
Modifier and TypeMethodDescriptionexecute()default ParsedAndRawResponse<ResponseContent> The default implementation returns a failed future carrying anAsyncNotSupportedException.onResponse(Consumer<ResponseContent> responseHandler)
-
Method Details
-
execute
ResponseContent execute() -
executeRaw
-
executeRawAsync
The default implementation returns a failed future carrying anAsyncNotSupportedException.An implementation must not throw and must not return
null: every failure, including an invalid request, completes the returned future exceptionally.- Returns:
- a
CompletableFutureof the parsed and raw response, completed without blocking the caller. - Since:
- 1.20.0
-
onResponse
-