#后端程序
from flask import Flask,request app = Flask(__name__) @app.route('/loginsss') def hello_world(): numb = int(request.args.get('numb')) numb += 1 return str(numb) if __name__ == '__main__': app.run()
#前段程序
import requests url = 'http://127.0.0.1:5000/loginsss' params = { 'numb':'4', } res = requests.get(url=url,params=params) print(res.text)
文章来源: https://blog.csdn.net/qq_44862918/article/details/91041383