ghost2loggerloopback.py 文件源码

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

项目:stackstorm-ghost2logger 作者: StackStorm-Exchange 项目源码 文件源码
def _ghost2loggergpurge(self):
        # Let's deal with the JSON API calls here
        self._logger.info('[Ghost2logger]: Purge Ghost2logger')

        HEADERS = {"Content-Type": 'application/json'}

        _URL = self._ghost_url + "/v1/all"
        try:
            r = requests.delete(_URL, headers=HEADERS, verify=False,
                                auth=(self._username, self._password))

            _data = r.json()
            self._logger.info('[Ghost2logger]: Purged ghost2logger' +
                              str(_data))
        except Exception as e:
            self._logger.info('[Ghost2logger]: Cannot purge Ghost2logger: ' +
                              str(e))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号