As per the https://autofac.readthedocs.io/en/latest/integration/netcore.html#quick-start page, the simplest, and most correct method is this:
// Generate a ServiceCollection to directly add elements to.
var serviceCollection = new ServiceCollection();
// Add the HTTP Client as per the extension.
serviceCollection.AddHttpClient();
serviceCollection.AddHttpClient<IUserService, UserService>();
serviceCollection.AddHttpClient<IPostService, PostService>();
// Build the ContainerBuilder.
var containerBuilder = new ContainerBuilder();
// Populate the builder from the ServiceCollection.
containerBuilder.Populate(serviceCollection);
// Continue with the AutoFac registrations after this point.