Constructs a basic authentication header from the username and password provided, and adds it to the request headers.
Used when shouldPresentCredentialsBeforeChallenge is set to YES.