Skip to content

Instantly share code, notes, and snippets.

jQuery.ajax({
type: "PUT",
url: "http://key:[email protected]:5984/staging/doc1",
data: '{}',
contentType: "application/json",
success: function (data, textStatus, XMLHttpRequest) {
alert("ok " + data);
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert("ko"); // {}, "error", undefined