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.Builderprotected HTTPRequestbuildRequest(HTTPRequest.HTTPMethod method, String path, Map<String, String> queryParams, Map<String, String> headers, Object body) voidclose()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:RESTClientReturns a REST client that authenticates requests using the given session.- Specified by:
withAuthSessionin interfaceRESTClient- Specified by:
withAuthSessionin classBaseHTTPClient
-
buildRequest
protected HTTPRequest buildRequest(HTTPRequest.HTTPMethod method, String path, Map<String, String> queryParams, Map<String, String> headers, Object body) - Specified by:
buildRequestin classBaseHTTPClient
-
execute
protected <T extends RESTResponse> T execute(HTTPRequest req, Class<T> responseType, Consumer<ErrorResponse> errorHandler, Consumer<Map<String, String>> responseHeaders) - Specified by:
executein classBaseHTTPClient
-
close
- Throws:
IOException
-
builder
-