Convert metrics to use the httpClient module

The httpClient module knows more about https; it also let me shrink the code rather nicely. It allows passing in the httpClient but I'm not using that anywhere yet.