[백엔드] Flask: return 타입, jsonify()
from flask import Flask, jsonify from http import HTTPStatus app = Flask(__name__) @app.route('/hithere', methods = ['GET'] ) def hi_there(): return 'Hithere~~~' @app.route('/', methods = ['GET']) def root(): return '안녕하세요' Return 타입 - string,dict,tuple, response instance, WSGI callable @app.route('/add',methods = ['GET']) def add(): data = 283+111 return str(data) - 숫자의 합이다. - 이때, return 뒤에 dat..
더보기