@app.route('/command', methods=['POST'])
def command():bcmd = bytes.fromhex(request.form['cmd'])print(bcmd)return Response('OK', mimetype='text/plain')
bytes.fromhex(request.form['cmd']):从表单中得到数据并且转为字节型
@app.route('/command', methods=['POST'])
def command():bcmd = bytes.fromhex(request.form['cmd'])print(bcmd)return Response('OK', mimetype='text/plain')
bytes.fromhex(request.form['cmd']):从表单中得到数据并且转为字节型