Basic Authentication in UniRest

Basic Authentication

Authenticating the request with basic authentication can be done by calling the basicAuth(username, password) function:

HttpResponse<JsonNode> response = Unirest.get("http://httpbin.org/headers")                                         .basicAuth("username", "password")                                         .asJson();