createHttpClient method
Returns a new HttpClient using the given context
.
When this override is installed, this function overrides the behavior of
new HttpClient
.
Implementation
@override
HttpClient createHttpClient(SecurityContext? context) {
var httpClient = super.createHttpClient(context);
httpClient.connectionFactory = (uri, String? proxyHost, int? proxyPort) =>
connectionFactory(uri, proxyHost, proxyPort, context);
return httpClient;
}