Package org.apache.iceberg.rest
Class HTTPClient
java.lang.Object
org.apache.iceberg.rest.HTTPClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
,RESTClient
An HttpClient for usage with the REST catalog.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic HTTPClient.Builder
void
close()
<T extends RESTResponse>
Tdelete
(String path, Class<T> responseType, Map<String, String> headers, Consumer<ErrorResponse> errorHandler) <T extends RESTResponse>
Tdelete
(String path, Map<String, String> queryParams, Class<T> responseType, Map<String, String> headers, Consumer<ErrorResponse> errorHandler) <T extends RESTResponse>
Tget
(String path, Map<String, String> queryParams, Class<T> responseType, Map<String, String> headers, Consumer<ErrorResponse> errorHandler) void
<T extends RESTResponse>
Tpost
(String path, RESTRequest body, Class<T> responseType, Map<String, String> headers, Consumer<ErrorResponse> errorHandler) <T extends RESTResponse>
Tpost
(String path, RESTRequest body, Class<T> responseType, Map<String, String> headers, Consumer<ErrorResponse> errorHandler, Consumer<Map<String, String>> responseHeaders) <T extends RESTResponse>
TpostForm
(String path, Map<String, String> formData, Class<T> responseType, Map<String, String> headers, Consumer<ErrorResponse> errorHandler)
-
Method Details
-
head
- Specified by:
head
in interfaceRESTClient
-
get
public <T extends RESTResponse> T get(String path, Map<String, String> queryParams, Class<T> responseType, Map<String, String> headers, Consumer<ErrorResponse> errorHandler) - Specified by:
get
in interfaceRESTClient
-
post
public <T extends RESTResponse> T post(String path, RESTRequest body, Class<T> responseType, Map<String, String> headers, Consumer<ErrorResponse> errorHandler) - Specified by:
post
in interfaceRESTClient
-
post
public <T extends RESTResponse> T post(String path, RESTRequest body, Class<T> responseType, Map<String, String> headers, Consumer<ErrorResponse> errorHandler, Consumer<Map<String, String>> responseHeaders) - Specified by:
post
in interfaceRESTClient
-
delete
public <T extends RESTResponse> T delete(String path, Class<T> responseType, Map<String, String> headers, Consumer<ErrorResponse> errorHandler) - Specified by:
delete
in interfaceRESTClient
-
delete
public <T extends RESTResponse> T delete(String path, Map<String, String> queryParams, Class<T> responseType, Map<String, String> headers, Consumer<ErrorResponse> errorHandler) - Specified by:
delete
in interfaceRESTClient
-
postForm
public <T extends RESTResponse> T postForm(String path, Map<String, String> formData, Class<T> responseType, Map<String, String> headers, Consumer<ErrorResponse> errorHandler) - Specified by:
postForm
in interfaceRESTClient
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
builder
-