Class HttpRequest
-
- All Implemented Interfaces:
-
com.swmansion.starknet.provider.Request
public final class HttpRequest<T extends Object> implements Request<T>
-
-
Field Summary
Fields Modifier and Type Field Description private final HttpService.Payloadpayloadprivate final Function<HttpResponse, T>deserializerprivate final HttpServiceservice
-
Constructor Summary
Constructors Constructor Description HttpRequest(HttpService.Payload payload, Function<HttpResponse, T> deserializer, HttpService service)
-
Method Summary
Modifier and Type Method Description final HttpService.PayloadgetPayload()final Function<HttpResponse, T>getDeserializer()final HttpServicegetService()Tsend()Send a request synchronously CompletableFuture<T>sendAsync()Send a request asynchronously -
-
Constructor Detail
-
HttpRequest
HttpRequest(HttpService.Payload payload, Function<HttpResponse, T> deserializer, HttpService service)
-
-
Method Detail
-
getPayload
final HttpService.Payload getPayload()
-
getDeserializer
final Function<HttpResponse, T> getDeserializer()
-
getService
final HttpService getService()
-
sendAsync
CompletableFuture<T> sendAsync()
Send a request asynchronously
-
-
-
-