I normally use cUrl to hit my endpoint at the minute. But am not at the stage where I need to think about building the client.
I normally hit my endpoint the following way :
curl -u "adminaccount:adminpassword" http://localhost:8080/api/private/v1/endpoint/
Lets say I have the below code
HttpGet getRequest = new HttpGet(
"http://localhost:8080/api/private/v1/endpoint/");
HttpResponse response = httpClient.execute(getRequest);
Now, I obviously need to pass in the equivalent of that :
-u" adminaccount:adminpassword"
somehow. Any ideas?