Created
February 4, 2016 01:01
-
-
Save rterp/a5461f8df7aa41419580 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("adminUser", "adminPassword"); | |
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