BasicAuthentication.setPreemptive
BasicAuthentication does not support preemptive authentication out of the box, because if misused or used incorrectly the preemptive authentication can lead to significant security issues, such as sending user credentials in clear text to an unauthorized third party.
Therefore, users are expected to evaluate potential benefits of preemptive authentication versus security risks in the context of their specific application environment.
By setting preemptive to true, the Authorization header will always be sent with the request.
Set preemptive Basic Authentication