How to make Flask/ keep Ajax HTTP connection alive?

前端 未结 2 474
南方客
南方客 2020-12-09 19:38

I have a jQuery Ajax call, like so:

    $(\"#tags\").keyup(function(event) {
      $.ajax({url: \"/terms\",
        type: \"POST\",
        contentType: \"ap         


        
2条回答
  •  感动是毒
    2020-12-09 20:12

    The default request_handler is WSGIRequestHandler.

    Before app.run(), Add one line, WSGIRequestHandler.protocol_version = "HTTP/1.1"

    Don't forget from werkzeug.serving import WSGIRequestHandler.

提交回复
热议问题