您发布的脚本和Python的JSON模块应该可以使您受益匪浅:
def response(context, flow): if flow.request.url == "...": # optionally filter based on some criteria... with depred(flow.response): # automatically depre gzipped responses. data = json.loads(flow.response.content) data["foo"] = "bar" flow.response.content = json.dumps(data)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)