Use a MockHttp client if offline or test mode.