import json def response(context, flow): if flow.request.url == "http://52.28.103.75/api/app": with open("response.json","r") as jsonFile: flow.response.content = json.dumps(json.load(jsonFile))