public class HTTPClient extends java.lang.Object implements RESTClient
Modifier and Type | Class and Description |
---|---|
static class |
HTTPClient.Builder |
Modifier and Type | Method and Description |
---|---|
static HTTPClient.Builder |
builder(java.util.Map<java.lang.String,java.lang.String> properties) |
void |
close() |
<T extends RESTResponse> |
delete(java.lang.String path,
java.lang.Class<T> responseType,
java.util.Map<java.lang.String,java.lang.String> headers,
java.util.function.Consumer<ErrorResponse> errorHandler) |
<T extends RESTResponse> |
delete(java.lang.String path,
java.util.Map<java.lang.String,java.lang.String> queryParams,
java.lang.Class<T> responseType,
java.util.Map<java.lang.String,java.lang.String> headers,
java.util.function.Consumer<ErrorResponse> errorHandler) |
<T extends RESTResponse> |
get(java.lang.String path,
java.util.Map<java.lang.String,java.lang.String> queryParams,
java.lang.Class<T> responseType,
java.util.Map<java.lang.String,java.lang.String> headers,
java.util.function.Consumer<ErrorResponse> errorHandler) |
void |
head(java.lang.String path,
java.util.Map<java.lang.String,java.lang.String> headers,
java.util.function.Consumer<ErrorResponse> errorHandler) |
<T extends RESTResponse> |
post(java.lang.String path,
RESTRequest body,
java.lang.Class<T> responseType,
java.util.Map<java.lang.String,java.lang.String> headers,
java.util.function.Consumer<ErrorResponse> errorHandler) |
<T extends RESTResponse> |
post(java.lang.String path,
RESTRequest body,
java.lang.Class<T> responseType,
java.util.Map<java.lang.String,java.lang.String> headers,
java.util.function.Consumer<ErrorResponse> errorHandler,
java.util.function.Consumer<java.util.Map<java.lang.String,java.lang.String>> responseHeaders) |
<T extends RESTResponse> |
postForm(java.lang.String path,
java.util.Map<java.lang.String,java.lang.String> formData,
java.lang.Class<T> responseType,
java.util.Map<java.lang.String,java.lang.String> headers,
java.util.function.Consumer<ErrorResponse> errorHandler) |
public void head(java.lang.String path, java.util.Map<java.lang.String,java.lang.String> headers, java.util.function.Consumer<ErrorResponse> errorHandler)
head
in interface RESTClient
public <T extends RESTResponse> T get(java.lang.String path, java.util.Map<java.lang.String,java.lang.String> queryParams, java.lang.Class<T> responseType, java.util.Map<java.lang.String,java.lang.String> headers, java.util.function.Consumer<ErrorResponse> errorHandler)
get
in interface RESTClient
public <T extends RESTResponse> T post(java.lang.String path, RESTRequest body, java.lang.Class<T> responseType, java.util.Map<java.lang.String,java.lang.String> headers, java.util.function.Consumer<ErrorResponse> errorHandler)
post
in interface RESTClient
public <T extends RESTResponse> T post(java.lang.String path, RESTRequest body, java.lang.Class<T> responseType, java.util.Map<java.lang.String,java.lang.String> headers, java.util.function.Consumer<ErrorResponse> errorHandler, java.util.function.Consumer<java.util.Map<java.lang.String,java.lang.String>> responseHeaders)
post
in interface RESTClient
public <T extends RESTResponse> T delete(java.lang.String path, java.lang.Class<T> responseType, java.util.Map<java.lang.String,java.lang.String> headers, java.util.function.Consumer<ErrorResponse> errorHandler)
delete
in interface RESTClient
public <T extends RESTResponse> T delete(java.lang.String path, java.util.Map<java.lang.String,java.lang.String> queryParams, java.lang.Class<T> responseType, java.util.Map<java.lang.String,java.lang.String> headers, java.util.function.Consumer<ErrorResponse> errorHandler)
delete
in interface RESTClient
public <T extends RESTResponse> T postForm(java.lang.String path, java.util.Map<java.lang.String,java.lang.String> formData, java.lang.Class<T> responseType, java.util.Map<java.lang.String,java.lang.String> headers, java.util.function.Consumer<ErrorResponse> errorHandler)
postForm
in interface RESTClient
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
public static HTTPClient.Builder builder(java.util.Map<java.lang.String,java.lang.String> properties)