I'm trying to post some json to the server from my single page app from the front End, Everything is working fine and i'm getting the data except the return statement where if I do a redirect to the /Contact
I get Unexpected token <
error. How do I go about this?
@app.route('/messageDump', methods=['POST'])
def messageDump():
request_json = request.get_json()
print(request_json.get('firstName'))
return redirect("/Contact", code=303)// gives error: Unexpected token < in JSON at position 0”
#return "helloWorld" //this is a comment: gives error Unexpected token h in JSON at position 0”