I am trying to run the portion of the code with Curl and Flask. But I a getting the 404 error. I am pretty sure I am writing the code right as well. But it's giving me the error.
Code:
@app.route('/todo/api/v1.0/tasks/<int:task_id>', methods=['GET'])
def get_task(task_id):
task = [task for task in tasks if task['id'] == task_id]
if len(task) == 0:
abort(404)
return jsonify({'task': task[0]})
REQEST: curl -i http://localhost:5000/todo/api/v1.0/tasks/2