Since HttpClient 4.3, I have been using the HttpClientBuilder. I am connecting to a REST service that has basic authentication. I am setting the credentials as follows:
I think HttpClient is like other curl based solution, it follows the spec.
And the spec is "Do not send the credentials except if server tell you to do so". So you get a 401 ("I want u to send credentials")...
It's a common soap ui problem: when you don't know, it's not obvious