use of org.jboss.resteasy.plugins.providers.StringTextStar in project syndesis-qe by syndesisio.
the class EndpointClient method getClient.
public static Client getClient(ResteasyJackson2Provider jackson2Provider) {
final ApacheHttpClient43Engine engine = new ApacheHttpClient43Engine(createAllTrustingClient());
final ResteasyProviderFactory providerFactory = new LocalResteasyProviderFactory();
providerFactory.register(jackson2Provider).register(// needed for GET application/octet-stream in PublicAPI to export zip
new InputStreamProvider()).register(// needed to POST mutipart form data (necessary for API provider + PublicAPI)
new MultipartFormDataWriter()).register(// needed to serialize text/plain (again for API provider)
new StringTextStar()).register(new ErrorLogger());
ResteasyClientBuilder clientBuilder = (ResteasyClientBuilder) ResteasyClientBuilder.newBuilder();
clientBuilder.providerFactory(providerFactory);
clientBuilder.httpEngine(engine);
return clientBuilder.build();
}
Aggregations