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