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.Payload
payload
private final Function<HttpResponse, T>
deserializer
private final HttpService
service
-
Constructor Summary
Constructors Constructor Description HttpRequest(HttpService.Payload payload, Function<HttpResponse, T> deserializer, HttpService service)
-
Method Summary
Modifier and Type Method Description final HttpService.Payload
getPayload()
final Function<HttpResponse, T>
getDeserializer()
final HttpService
getService()
T
send()
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
-
-
-
-