Last active
August 29, 2015 14:16
-
-
Save nherbaut/add5ea9699553cc8de95 to your computer and use it in GitHub Desktop.
basic auth jersey
This file contains hidden or 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
| public void testGetIt() throws IOException { | |
| HttpAuthenticationFeature feature = HttpAuthenticationFeature.basic("user", "superSecretPassword"); | |
| Client client = ClientBuilder.newClient(); | |
| client.register(feature); | |
| WebTarget target = client.target("http://localhost:8080/myapp"); | |
| target.path("myresource").get(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment