createHttpClient method

  1. @override
HttpClient createHttpClient(
  1. SecurityContext? context
)
override

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) {
  return NewRelicHttpClient(
      client: createHttpClientFn != null
          ? createHttpClientFn!(context!)
          : current?.createHttpClient(context) ??
              super.createHttpClient(context));
}