kajax: PUT should have been POST

This commit is contained in:
Andreas Rumpf 2017-04-24 17:52:29 +02:00
commit 8666d8d6d6

View file

@ -37,10 +37,10 @@ proc ajax(meth, url: cstring; headers: openarray[(cstring, cstring)];
contWrapper(this.status, this.statusText) contWrapper(this.status, this.statusText)
ajax.send(data) ajax.send(data)
proc ajaxPut*(url: cstring; headers: openarray[(cstring, cstring)]; proc ajaxPost*(url: cstring; headers: openarray[(cstring, cstring)];
data: cstring; data: cstring;
cont: proc (httpStatus: int, response: cstring)) = cont: proc (httpStatus: int, response: cstring)) =
ajax("PUT", url, headers, data, cont) ajax("POST", url, headers, data, cont)
proc ajaxGet*(url: cstring; headers: openarray[(cstring, cstring)]; proc ajaxGet*(url: cstring; headers: openarray[(cstring, cstring)];
cont: proc (httpStatus: int, response: cstring)) = cont: proc (httpStatus: int, response: cstring)) =