i am usig flask to run the below posted micro-service. what i am trying to do is to execute the posted url mentioned below so that when it is called it must result in calling the method getDistance2/
in getDistance2 as shown below i am trying to parse the values entered in the url.
the problem is that non of the print statements get executed nor the retuen statement that contains "returned"
please let me know how to input the valued correctly in the url and run the body of getDistance2
url:
http://127.0.0.1:5000/getDistance2/originLng=8.681436&originLat=49.414554&destinationLng=8.681561&destinationLat=49.414747%22
code:
@app.route("/getDistance2/<string:str>", methods=['GET'] )
def getDistance2(originAndDestinationGPSCoords):
#api_key = request.args.get('api_key')
# startLat, startLng= request.args.get('start').split(',')
# end1Lat, endLng = request.args.get('end').split(',')
a, b, c, d= request.args.get('str').split('&')
print(a)
print(b)
print(c)
print(d)
originLng, startLng= request.args.get('originLng').split('&')
originLat, endLng = request.args.get('originLat').split('&')
destinationLng, endLng = request.args.get('destinationLng').split('&')
destinationLat, endLng = request.args.get('destinationLat').split('&')
print(originLng)
print(originLat)
print(destinationLng)
print(destinationLat)
print(requear.args.list)
return "returned"