Note:
In Basic Authentication, a client typically makes an initial request without credentials. If the server responds with 401 Unauthorized, the client retries with credentials.
However, some servers immediately close the connection after a 401 response, causing Basic Authentication to fail. In such cases, sending the credentials directly through Custom HTTP(S) Headers avoids the issue.