I have a python script which uses flask_restful and have queries different services via REST 3 times with in a script and all the 3 REST queries are sequential and there is a data dependency. We use the JSON response object of the first rest query to build the json request for the next one. The python script works perfectly fine when run in my local machine and when moved to the docker container and run. The script fails with an error saying "No JSON object could be decoded" from the response object of the first JSON query.
from flask_restful import Api, request
import json
import requests
resp = requests.post(url=url,data=dat,headers=headers)
json_data = json.loads(resp.content)
resp.content throws
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
But the same script works when run locally. Thank you. Any help would be much appreciated. Thanks