public class HttpService extends java.lang.Object implements Web3jService
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_URL |
| Constructor and Description |
|---|
HttpService() |
HttpService(java.lang.String url) |
HttpService(java.lang.String url,
org.apache.http.impl.client.CloseableHttpClient httpClient) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addHeaders(java.util.List<org.apache.http.Header> headers) |
<T extends Response> |
getResponseHandler(java.lang.Class<T> type) |
<T extends Response> |
send(Request request,
java.lang.Class<T> responseType) |
<T extends Response> |
sendAsync(Request jsonRpc20Request,
java.lang.Class<T> responseType) |
protected void |
setHttpClient(org.apache.http.impl.client.CloseableHttpClient httpClient) |
public static final java.lang.String DEFAULT_URL
public HttpService(java.lang.String url,
org.apache.http.impl.client.CloseableHttpClient httpClient)
public HttpService(java.lang.String url)
public HttpService()
protected void setHttpClient(org.apache.http.impl.client.CloseableHttpClient httpClient)
public <T extends Response> T send(Request request, java.lang.Class<T> responseType) throws java.io.IOException
send in interface Web3jServicejava.io.IOExceptionprotected void addHeaders(java.util.List<org.apache.http.Header> headers)
public <T extends Response> org.apache.http.client.ResponseHandler<T> getResponseHandler(java.lang.Class<T> type)
public <T extends Response> java.util.concurrent.CompletableFuture<T> sendAsync(Request jsonRpc20Request, java.lang.Class<T> responseType)
sendAsync in interface Web3jService