use of org.projectnessie.client.rest.NessieHttpResponseFilter in project nessie by projectnessie.
the class AbstractRest method init.
protected void init(URI uri) {
NessieApiV1 api = HttpClientBuilder.builder().withUri(uri).build(NessieApiV1.class);
ObjectMapper mapper = new ObjectMapper().enable(SerializationFeature.INDENT_OUTPUT).disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
HttpClient.Builder httpClient = HttpClient.builder().setBaseUri(uri).setObjectMapper(mapper);
httpClient.addResponseFilter(new NessieHttpResponseFilter(mapper));
init(api, httpClient, uri);
}
use of org.projectnessie.client.rest.NessieHttpResponseFilter in project nessie by projectnessie.
the class TestNessieError method setup.
@BeforeAll
static void setup() {
ObjectMapper mapper = new ObjectMapper().enable(SerializationFeature.INDENT_OUTPUT).disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
client = HttpClient.builder().setBaseUri(URI.create(baseURI)).setObjectMapper(mapper).addResponseFilter(new NessieHttpResponseFilter(mapper)).build();
}
use of org.projectnessie.client.rest.NessieHttpResponseFilter in project nessie by projectnessie.
the class NessieHttpClient method buildClient.
private static HttpClient buildClient(HttpAuthentication authentication, boolean enableTracing, Builder clientBuilder) {
clientBuilder.setObjectMapper(MAPPER);
if (enableTracing) {
addTracing(clientBuilder);
}
if (authentication != null) {
authentication.applyToHttpClient(clientBuilder);
}
clientBuilder.addResponseFilter(new NessieHttpResponseFilter(MAPPER));
return clientBuilder.build();
}
Aggregations