Hi,
I am developing an extension to hide some sensitive data. Currently, I am trying a really simple example with modify mode.
I got next code:
payload = sys.stdin.readlines()[0]
try:
hoverflyResponse = json.loads(payload)
if (hoverflyResponse['response']['status'] > 0):
hoverflyResponse['response']['body'] = "{'foo': 'baz'}\n"
print(json.dumps(hoverflyResponse))
except Exception, err:
print payload
{'foo': 'baz'}
curl: (18) transfer closed with 817 bytes remaining to read
Any idea if there is a bug in middleware with modify mode or am I doing something wrong?
Thanks