mtmproxy http get request in script

ⅰ亾dé卋堺 提交于 2019-12-11 14:26:21

问题


How to make http request in response (script)

class Intercept:
    def response(self, flow: HTTPFlow):
        t_id = flow.request.query.get('task_id')
        if not t_id:
            return

        rsp = requests.get(
            'https://example.com/v1/tasks', {'task_id': t_id})

        data = rsp.json()


addons = [
    Intercept()
]

this code block mitmproxy response

来源:https://stackoverflow.com/questions/55066451/mtmproxy-http-get-request-in-script

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!