添加put表单接口
parent
fc3dfa7ef4
commit
542867f4f3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue