void addCredentials(Uri url, String realm, HttpClientCredentials credentials)

Add credentials to be used for authorizing HTTP requests.

Source

void addCredentials(Uri url, String realm, HttpClientCredentials credentials);