Cross-host support. Users are expected to inject their own ApiManager in order to make this work. If an ApiManager is not injected, this should behave the same as it did before this change. Change-Id: I6a9c2e6aa39ab0ee650f23da97347274e557a1cf