Package org.apache.iceberg.rest
Class HTTPClient
java.lang.Object
org.apache.iceberg.rest.BaseHTTPClient
org.apache.iceberg.rest.HTTPClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
,RESTClient
An HttpClient for usage with the REST catalog.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic HTTPClient.Builder
protected HTTPRequest
buildRequest
(HTTPRequest.HTTPMethod method, String path, Map<String, String> queryParams, Map<String, String> headers, Object body) void
close()
protected <T extends RESTResponse>
Texecute
(HTTPRequest req, Class<T> responseType, Consumer<ErrorResponse> errorHandler, Consumer<Map<String, String>> responseHeaders) withAuthSession
(AuthSession session) Returns a REST client that authenticates requests using the given session.Methods inherited from class org.apache.iceberg.rest.BaseHTTPClient
delete, delete, get, head, post, post, postForm
-
Method Details
-
withAuthSession
Description copied from interface:RESTClient
Returns a REST client that authenticates requests using the given session.- Specified by:
withAuthSession
in interfaceRESTClient
- Specified by:
withAuthSession
in classBaseHTTPClient
-
buildRequest
protected HTTPRequest buildRequest(HTTPRequest.HTTPMethod method, String path, Map<String, String> queryParams, Map<String, String> headers, Object body) - Specified by:
buildRequest
in classBaseHTTPClient
-
execute
protected <T extends RESTResponse> T execute(HTTPRequest req, Class<T> responseType, Consumer<ErrorResponse> errorHandler, Consumer<Map<String, String>> responseHeaders) - Specified by:
execute
in classBaseHTTPClient
-
close
- Throws:
IOException
-
builder
-