0

我的代码如下:

Ajax("DELETE", "..../delete/"+employee.id)
      .setRequestContentTypeJsonUtf8
      .send("")
      .onComplete { xhr =>
        println("Request completed with response:"+xhr.responseText)
        xhr.status match {
          case 200 => {
              println("Success with status 200")
              $.modState(...code to update component state)
          }
          case _   => {
            println("Response is:"+xhr.responseText)
            Callback.log(xhr.responseText)
          }
        }
      }

请求被发送到服务器(akka-http rest 端点),它确实成功删除了记录,但 onComplete 中的代码永远不会执行。

我在这里想念什么?

4

0 回答 0