Created
February 4, 2016 00:58
-
-
Save rterp/997a9b6260c1469fb519 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected static ResteasyClient getClient() { | |
CredentialsProvider credentialsProvider = new BasicCredentialsProvider(); | |
UsernamePasswordCredentials credentials = new UsernamePasswordCredentials("admin", "adminadmin"); | |
credentialsProvider.setCredentials(AuthScope.ANY, credentials); | |
HttpClient httpclient = HttpClientBuilder.create().setDefaultCredentialsProvider(credentialsProvider).build(); | |
ApacheHttpClient4Engine engine = new ApacheHttpClient4Engine(httpclient, true); | |
return new ResteasyClientBuilder().httpEngine(engine).build(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment