Package de.chojo.nexus.requests
Class RequestBuilder<T>
java.lang.Object
de.chojo.nexus.requests.RequestBuilder<T>
- Type Parameters:
T
- type of response
- All Implemented Interfaces:
Request<T>
- Direct Known Subclasses:
ASearchRequest
,DeleteRequest
,DownloadRequest
,DownloadStreamRequest
,DownloadToFileRequest
,GetRequest
,ListRequest
,ListRequest
A request builder used to build, execute requests and parse the response
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract T
complete()
Sends the request and handles the response on the current threadvoid
Adds a parameter to the urivoid
Adds an element to the path.void
Adds an element to the path.abstract CompletableFuture<T>
queue()
Queue the request asynchronous.protected URI
uri()
-
Field Details
-
rest
-
-
Constructor Details
-
RequestBuilder
Create a new request builder- Parameters:
rest
- rest client
-
-
Method Details
-
parameter
Adds a parameter to the uri- Parameters:
key
- parameter keyobject
- parameter value
-
path
Adds an element to the path.- Parameters:
path
- path
-
path
Adds an element to the path.- Parameters:
path
- path
-
uri
-
queue
Description copied from interface:Request
Queue the request asynchronous. -
complete
Description copied from interface:Request
Sends the request and handles the response on the current thread
-