__init__.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:Chatbot 作者: ahmadfaizalbh 项目源码 文件源码
def __api_request(self,url,method,**karg):
        try:return requests.__dict__[method.lower().strip()](url,**karg)
        except requests.exceptions.MissingSchema as e:
            return self.__api_request("http://"+url,method,**karg)
        except requests.exceptions.ConnectionError as e:
            raise RuntimeError("Couldn't connect to server (unreachable). Check your network")
        except KeyError as e:
            raise RuntimeError("Invalid method name '%s' in api.json" % method)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号