Package com.mewna.catnip.rest.requester
Interface Requester
- All Known Implementing Classes:
AbstractRequester
,BurstRequester
,SerialRequester
public interface Requester
A REST requester. The requester is responsible for queuing up new requests,
and executing them at some point in the future. Once the request has been
executed, the observable can then start emitting the response.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
POJO that represents an outbound request to Discord's REST API. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
io.reactivex.rxjava3.core.Observable<ResponsePayload>
Queues a new request to be executed.
-
Field Details
-
REASON_HEADER
- See Also:
-
-
Method Details
-
catnip
-
queue
@Nonnull @CheckReturnValue io.reactivex.rxjava3.core.Observable<ResponsePayload> queue(@Nonnull Requester.OutboundRequest r) Queues a new request to be executed.- Parameters:
r
- The request to execute.- Returns:
- An
Observable
that emits when the request has completed.
-