Within HttpClient, preemptive authentication can be enabled. HttpClient sends the response of basic authentication before unauthorized is given by server, in preemptive authentication mode. This will be reducing overhead for connection making.
To enable it, use this code.
For preemptive authentication, default credentials are required to be set for proxy host or target. Preemptive authentication will