I'm able to test this file on Postman, however it is failing when I'm doing it on Python. I'm working behind a network proxy at the moment so I've specified the proxy.
This is the set of codes that I'm using:
# specify proxy proxy = {'https':'https://username:[email protected]:1010', 'http':'http://username:[email protected]:1010'} # specify content header = {'Content-Type': 'application/json'} # get input testFile = open('test.json', 'r') jsonInput = testFile.read() requestJSON = json.loads(jsonInput) # specify url url = 'http://127.0.0.1:5000/test' response = requests.post(url, json=requestJSON, proxies=proxy, headers=header) I'm getting a value of 403 when I check for the status code of response.