I am taking in bunch of inputs from the user in html which I am then passing on to ajax query to get the response.
$.ajax({
url:"http://0.0.0.0:8080/getReport",
type:"GET",
data:JSON.stringify(out),
dataType:"json",
contentType:"application/json"
})
Here is the Flask code that serves the above request.
@app.route('/getReport', methods=['GET'])
def report():
return Response('this is a sample response')
The above method is returning the response which I can catch in complete
argument of ajax but I don't understand as to why it is not displaying Response? (which will be just the text on entire page.)