Hi. I have this POST route:
def post_session_data():
if request.is_json:
request_data = request.get_json()
print("Received JSON data:", request_data)
else:
request_data = None
print("Request is not JSON")
request_data = request.get_json()
print (request_data)
if not request_data:
print ("boss_battles/post_session data, no data received")
return "request_data null, no data received"
if request.method == 'GET':
print ("boss_battles/post_session data no data received")
return "GET method... not supported?"
if request_data['testingMode'] == True:
print ("boss_battles/post_session data testing mode, not saving data")
return "testing mode, not saving data"
When I run it locally... https://imgur.com/tJZc1Hi
When I try and post to the server... https://imgur.com/PmT0RpD https://imgur.com/8QhsMdp
Not sure how to fix this.. I've also checked previous forum posts but it seems no one has this issue, thanks.