refactoring delete API, added external JSON-LD context

This commit is contained in:
El RIDO 2015-10-11 21:22:00 +02:00
parent 9e6e29bc93
commit 1d6cfb7f3b
8 changed files with 102 additions and 25 deletions

View file

@ -671,9 +671,11 @@ $(function() {
}
if (comments[0].meta.burnafterreading)
{
// unfortunately many web servers don't support DELETE (and PUT) out of the box
$.ajax({
// type: 'DELETE', // unfortunately many web servers will not support DELETE and PUT by default
url: this.scriptLocation() + '?pasteid=' + this.pasteID() + '&deletetoken=burnafterreading',
type: 'POST',
url: this.scriptLocation() + '?' + this.pasteID(),
data: {deletetoken: 'burnafterreading'},
dataType: 'json',
headers: this.headers
})