@sp.route("/gettheSpdata", methods=["POST"])
def gettheSpdata():
Request全局变量
最好只在程序入口使用,可以用来
接受信息,如post的data,cookies
value = request.form["value"]
depart = request.cookies.get('depart')
request.args.get('img')
得到请求参数
发送请求
requests.post(url,data,cookies)
p = {"spcode":spcode,"height":height,"width":width,"thickness":thickness}
cookie = {"depart":str(depart),"comp":str(comp)}
r = requests.post("http://127.0.0.1:5003/resizeimg", data=p,cookies=cookie)