Package org.apache.iceberg.rest
Class HTTPClient
- java.lang.Object
-
- org.apache.iceberg.rest.HTTPClient
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,RESTClient
public class HTTPClient extends java.lang.Object implements RESTClient
An HttpClient for usage with the REST catalog.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HTTPClient.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static HTTPClient.Builder
builder()
Deprecated.will be removed in 1.3.0; usebuilder(Map)
static HTTPClient.Builder
builder(java.util.Map<java.lang.String,java.lang.String> properties)
void
close()
<T extends RESTResponse>
Tdelete(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>
Tdelete(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>
Tget(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>
Tpost(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>
Tpost(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>
TpostForm(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)
-
-
-
Method Detail
-
head
public void head(java.lang.String path, java.util.Map<java.lang.String,java.lang.String> headers, java.util.function.Consumer<ErrorResponse> errorHandler)
- Specified by:
head
in interfaceRESTClient
-
get
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)
- Specified by:
get
in interfaceRESTClient
-
post
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)
- Specified by:
post
in interfaceRESTClient
-
post
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)
- Specified by:
post
in interfaceRESTClient
-
delete
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)
- Specified by:
delete
in interfaceRESTClient
-
delete
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)
- Specified by:
delete
in interfaceRESTClient
-
postForm
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)
- Specified by:
postForm
in interfaceRESTClient
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
builder
@Deprecated public static HTTPClient.Builder builder()
Deprecated.will be removed in 1.3.0; usebuilder(Map)
- Returns:
- http client builder
-
builder
public static HTTPClient.Builder builder(java.util.Map<java.lang.String,java.lang.String> properties)
-
-