当前位置: 代码迷 >> 综合 >> request.form以及postman发送表单数据
  详细解决方案

request.form以及postman发送表单数据

热度:0   发布时间:2024-03-08 04:38:49.0
@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']):从表单中得到数据并且转为字节型

 

  相关解决方案