public final class RestClient extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RestClient.Response |
Modifier and Type | Field and Description |
---|---|
static int |
HTTP_NOT_FOUND
HTTP status code 404 NOT FOUND
|
static int |
HTTP_OK
HTTP status code 200 OK
|
Modifier | Constructor and Description |
---|---|
protected |
RestClient(String url) |
Modifier and Type | Method and Description |
---|---|
static RestClient |
create(String url) |
RestClient |
expectResponseCodes(Integer... codes) |
RestClient.Response |
get() |
RestClient.Response |
post() |
RestClient |
withBody(String body) |
RestClient |
withCaCertificates(String caCertificate) |
RestClient |
withConnectTimeoutSeconds(int connectTimeoutSeconds) |
RestClient |
withHeader(String name,
String value) |
RestClient |
withHeaders(Map<String,String> headers) |
RestClient |
withReadTimeoutSeconds(int readTimeoutSeconds) |
RestClient |
withRetries(int retries) |
public static final int HTTP_OK
public static final int HTTP_NOT_FOUND
protected RestClient(String url)
public static RestClient create(String url)
public RestClient withHeaders(Map<String,String> headers)
public RestClient withHeader(String name, String value)
public RestClient withBody(String body)
public RestClient withReadTimeoutSeconds(int readTimeoutSeconds)
public RestClient withConnectTimeoutSeconds(int connectTimeoutSeconds)
public RestClient withRetries(int retries)
public RestClient withCaCertificates(String caCertificate)
public RestClient expectResponseCodes(Integer... codes)
public RestClient.Response get()
public RestClient.Response post()
Copyright © 2021 Hazelcast, Inc.. All rights reserved.