添加put表单接口

main
karlis 2023-07-07 05:22:31 +08:00
parent fc3dfa7ef4
commit 542867f4f3
1 changed files with 12 additions and 0 deletions

View File

@ -70,6 +70,18 @@ QtObject {
xhr.send(arg)
}
function putForm(url, arg, success, failure) {
var xhr = new XMLHttpRequest
xhr.open("POST", baseUrl + url)
xhr.setRequestHeader("Content-Length", arg.length)
xhr.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded;")
xhr.onreadystatechange = function () {
handleResponse(xhr, success, failure)
}
xhr.send(arg)
}
/* function post(url, arg, success, failure) {
var xhr = new XMLHttpRequest