Class OkHttpService
-
- All Implemented Interfaces:
-
com.swmansion.starknet.service.http.HttpService
public final class OkHttpService implements HttpService
Service for making http requests using OkHttp library. You can provide it with your client to avoid wasting resources.
-
-
Constructor Summary
Constructors Constructor Description OkHttpService()
OkHttpService(OkHttpClient client)
-
Method Summary
Modifier and Type Method Description HttpResponse
send(HttpService.Payload payload)
Send a synchronous http request. CompletableFuture<HttpResponse>
sendAsync(HttpService.Payload payload)
Send an asynchronous http request. -
-
Method Detail
-
send
HttpResponse send(HttpService.Payload payload)
Send a synchronous http request.
- Parameters:
payload
- a payload to be sent
-
sendAsync
CompletableFuture<HttpResponse> sendAsync(HttpService.Payload payload)
Send an asynchronous http request.
- Parameters:
payload
- a payload to be sent
-
-
-
-