
fetch('/bucket').then(res => res.json()).then(data => {
console.log(data)
alert(data["msg"]);
html 파일에서 요 부분이 /bucket에서 데이터를 가져온다는 것까지는 알겠는데,
파이썬 파일에서
@app.route("/bucket", methods=["POST"])
def bucket_post():
sample_receive = request.form['sample_give']
print(sample_receive)
return jsonify({'msg': 'POST 연결 완료!'})
@app.route("/bucket", methods=["GET"])
def bucket_get():
return jsonify({'msg': 'GET 연결 완료!'})
요 두가지 /bucket 중 어떤 이유로 밑에 있는 bucket을 가져오는걸까요?
