It accepts a apache http client, but closes it after every call. This means multiple threads cannot safely share the same rest client instance.
I'm not sure what is relying on this behavior, and so if we fix it directly it may introduce resource leaks for clients that aren't closing their http client elsewhere.