public interface RESTClient
extends java.io.Closeable
Referred from core/src/main/java/org/apache/iceberg/rest/RESTClient.java
Modifier and Type | Method and Description |
---|---|
default <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)
Perform a DELETE request on the specified path with given information.
|
default <T extends RESTResponse> |
delete(java.lang.String path,
java.lang.Class<T> responseType,
java.util.function.Supplier<java.util.Map<java.lang.String,java.lang.String>> headers,
java.util.function.Consumer<ErrorResponse> errorHandler)
Perform a DELETE request on the specified path with given information and no query parameters.
|
<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)
Perform a DELETE request on the specified path with given information.
|
default <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.function.Supplier<java.util.Map<java.lang.String,java.lang.String>> headers,
java.util.function.Consumer<ErrorResponse> errorHandler)
Perform a DELETE request on the specified path with given information.
|
default <T extends RESTResponse> |
get(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)
Perform a GET request on the specified path with given information and no query parameters.
|
default <T extends RESTResponse> |
get(java.lang.String path,
java.lang.Class<T> responseType,
java.util.function.Supplier<java.util.Map<java.lang.String,java.lang.String>> headers,
java.util.function.Consumer<ErrorResponse> errorHandler)
Perform a GET request on the specified path with given information and no query parameters.
|
<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)
Perform a GET request on the specified path with given information.
|
default <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.function.Supplier<java.util.Map<java.lang.String,java.lang.String>> headers,
java.util.function.Consumer<ErrorResponse> errorHandler)
Perform a GET request on the specified path with given information.
|
void |
head(java.lang.String path,
java.util.Map<java.lang.String,java.lang.String> headers,
java.util.function.Consumer<ErrorResponse> errorHandler) |
default void |
head(java.lang.String path,
java.util.function.Supplier<java.util.Map<java.lang.String,java.lang.String>> headers,
java.util.function.Consumer<ErrorResponse> errorHandler)
Perform a HEAD request on the specified path with the given headers and error handling.
|
<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) |
default <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)
Perform a POST request on the specified path with a given information.
|
default <T extends RESTResponse> |
post(java.lang.String path,
RESTRequest body,
java.lang.Class<T> responseType,
java.util.function.Supplier<java.util.Map<java.lang.String,java.lang.String>> headers,
java.util.function.Consumer<ErrorResponse> errorHandler)
Perform a POST request on the specified path with given information.
|
default <T extends RESTResponse> |
post(java.lang.String path,
RESTRequest body,
java.lang.Class<T> responseType,
java.util.function.Supplier<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)
Perform a POST request on the specified path with a given information.
|
<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) |
default <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.function.Supplier<java.util.Map<java.lang.String,java.lang.String>> headers,
java.util.function.Consumer<ErrorResponse> errorHandler)
Perform a POST request with form data on the specified path with the given information.
|
<T extends RESTResponse> |
put(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) |
default <T extends RESTResponse> |
put(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)
Perform a PUT request on the specified path with a request body, response type, headers, and
error handling.
|
default <T extends RESTResponse> |
put(java.lang.String path,
RESTRequest body,
java.lang.Class<T> responseType,
java.util.function.Supplier<java.util.Map<java.lang.String,java.lang.String>> headers,
java.util.function.Consumer<ErrorResponse> errorHandler)
Perform a PUT request on the specified path with given information.
|
default <T extends RESTResponse> |
put(java.lang.String path,
RESTRequest body,
java.lang.Class<T> responseType,
java.util.function.Supplier<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)
Perform a PUT request on the specified path with given information.
|
default void head(java.lang.String path, java.util.function.Supplier<java.util.Map<java.lang.String,java.lang.String>> headers, java.util.function.Consumer<ErrorResponse> errorHandler)
path
- The path to be requested.headers
- The headers to be included in the request.errorHandler
- The consumer for handling error responses.void head(java.lang.String path, java.util.Map<java.lang.String,java.lang.String> headers, java.util.function.Consumer<ErrorResponse> errorHandler)
default <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.function.Supplier<java.util.Map<java.lang.String,java.lang.String>> headers, java.util.function.Consumer<ErrorResponse> errorHandler)
T
- The type of the response.path
- The path to be requested.queryParams
- The query parameters to be included in the request.responseType
- The class representing the type of the response.headers
- The headers to be included in the request.errorHandler
- The consumer for handling error responses.default <T extends RESTResponse> T delete(java.lang.String path, java.lang.Class<T> responseType, java.util.function.Supplier<java.util.Map<java.lang.String,java.lang.String>> headers, java.util.function.Consumer<ErrorResponse> errorHandler)
T
- The type of the response.path
- The path to be requested.responseType
- The class representing the type of the response.headers
- The headers to be included in the request.errorHandler
- The consumer for handling error responses.default <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)
T
- The type of the response.path
- The path to be requested.responseType
- The class representing the type of the response.headers
- The headers to be included in the request.errorHandler
- The consumer for handling error responses.<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)
T
- The type of the response.path
- The path to be requested.queryParams
- The query parameters to be included in the request (ignored).responseType
- The class representing the type of the response.headers
- The headers to be included in the request.errorHandler
- The consumer for handling error responses.default <T extends RESTResponse> T get(java.lang.String path, java.lang.Class<T> responseType, java.util.function.Supplier<java.util.Map<java.lang.String,java.lang.String>> headers, java.util.function.Consumer<ErrorResponse> errorHandler)
T
- The type of the response.path
- The path to be requested.responseType
- The class representing the type of the response.headers
- The headers to be included in the request.errorHandler
- The consumer for handling error responses.default <T extends RESTResponse> T get(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
- The type of the response.path
- The path to be requested.responseType
- The class representing the type of the response.headers
- The headers to be included in the request.errorHandler
- The consumer for handling error responses.default <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.function.Supplier<java.util.Map<java.lang.String,java.lang.String>> headers, java.util.function.Consumer<ErrorResponse> errorHandler)
T
- The type of the response.path
- The path to be requested.queryParams
- The query parameters to be included in the request.responseType
- The class representing the type of the response.headers
- The headers to be included in the request.errorHandler
- The consumer for handling error responses.<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)
T
- The type of the response.path
- The path to be requested.queryParams
- The query parameters to be included in the request.responseType
- The class representing the type of the response.headers
- The headers to be included in the request.errorHandler
- The consumer for handling error responses.default <T extends RESTResponse> T post(java.lang.String path, RESTRequest body, java.lang.Class<T> responseType, java.util.function.Supplier<java.util.Map<java.lang.String,java.lang.String>> headers, java.util.function.Consumer<ErrorResponse> errorHandler)
T
- The type of the response.path
- The path to be requested.body
- The request body to be included in the POST request.responseType
- The class representing the type of the response.headers
- The headers to be included in the request.errorHandler
- The consumer for handling error responses.default <T extends RESTResponse> T post(java.lang.String path, RESTRequest body, java.lang.Class<T> responseType, java.util.function.Supplier<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
- The type of the response.path
- The path to be requested.body
- The request body to be included in the POST request.responseType
- The class representing the type of the response.headers
- The headers to be included in the request.errorHandler
- The consumer for handling error responses.responseHeaders
- The consumer for handling response headers (unsupported in this method).default <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)
T
- The type of the response.path
- The path to be requested.body
- The request body to be included in the POST request.responseType
- The class representing the type of the response.headers
- The headers to be included in the request.errorHandler
- The consumer for handling error responses.responseHeaders
- The consumer for handling response headers (unsupported in this method).java.lang.UnsupportedOperationException
- If trying to handle response headers (unsupported).<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)
default <T extends RESTResponse> T put(java.lang.String path, RESTRequest body, java.lang.Class<T> responseType, java.util.function.Supplier<java.util.Map<java.lang.String,java.lang.String>> headers, java.util.function.Consumer<ErrorResponse> errorHandler)
T
- The type of the response.path
- The path to be requested.body
- The request body to be included in the PUT request.responseType
- The class representing the type of the response.headers
- The headers to be included in the request.errorHandler
- The consumer for handling error responses.default <T extends RESTResponse> T put(java.lang.String path, RESTRequest body, java.lang.Class<T> responseType, java.util.function.Supplier<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
- The type of the response.path
- The path to be requested.body
- The request body to be included in the PUT request.responseType
- The class representing the type of the response.headers
- The supplier for providing headers to be included in the request.errorHandler
- The consumer for handling error responses.responseHeaders
- The consumer for handling response headers.default <T extends RESTResponse> T put(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
- The type of the response.path
- The path to be requested.body
- The request body to be included in the PUT request.responseType
- The class representing the type of the response.headers
- The headers to be included in the request.errorHandler
- The consumer for handling error responses.responseHeaders
- This parameter is not supported and should be set to null.java.lang.UnsupportedOperationException
- if responseHeaders
is not null, as returning
response headers is not supported.<T extends RESTResponse> T put(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)
default <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.function.Supplier<java.util.Map<java.lang.String,java.lang.String>> headers, java.util.function.Consumer<ErrorResponse> errorHandler)
T
- The type of the response.path
- The path to be requested.formData
- The form data to be included in the POST request body.responseType
- The class representing the type of the response.headers
- The supplier for providing headers to be included in the request.errorHandler
- The consumer for handling error responses.<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)