如何在响应中发送http请求(脚本)
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()
]
此代码阻止mitmproxy响应