i have defined a get route for my data minning project and i do not receive the output .Instead ii receive null as the output or else a 404 errror
#import flask
from http.client import responses
import util
from flask import Flask, request, jsonify
app =Flask(__name__)
# @app.route('/hello')
def hello():
return "HI girl"
# we need 2 routings, to return the locations in the file
@app.route('/home')
def home():
return "welcome to thr home page"
@app.route('/get_location_names', methods=['GET'])
def get_location_names():
#returned would be jsonify method
response =jsonify({
"locations":util.get_location_names()
})
response.headers.add("Access-Control-Allow-Origin", '*')
return response
enter image description here
i have defined all the necessary steps