Package de.chojo.nexus.requests
Interface Request<T>
- Type Parameters:
T- type of response
- All Known Implementing Classes:
ASearchRequest,DeleteRequest,DownloadRequest,DownloadRequest,DownloadStreamRequest,DownloadToFileRequest,GetRequest,ListRequest,ListRequest,RequestBuilder,SearchRequest,SearchRequest
public interface Request<T>
A request allowing to retrieve a response
-
Method Details
-
queue
CompletableFuture<T> queue()Queue the request asynchronous.- Returns:
- completable future providing the response
-
complete
T complete()Sends the request and handles the response on the current thread- Returns:
- response
-