use factory to get http protocol