Created
October 28, 2012 14:13
-
-
Save melvincarvalho/3968713 to your computer and use it in GitHub Desktop.
file ops
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function deleteFile(file) { | |
var body = ''; | |
xhr = new XMLHttpRequest(); | |
xhr.open('DELETE', file, false); | |
xhr.setRequestHeader('Content-Type', 'text/turtle; charset=UTF-8'); | |
xhr.send(body); | |
} | |
function putFile(file, data) { | |
xhr = new XMLHttpRequest(); | |
xhr.open('PUT', file, false); | |
xhr.setRequestHeader('Content-Type', 'text/turtle; charset=UTF-8'); | |
xhr.send(data); | |
} | |
function postFile(file, data) { | |
xhr = new XMLHttpRequest(); | |
xhr.open('POST', file, false); | |
xhr.setRequestHeader('Content-Type', 'text/turtle; charset=UTF-8'); | |
xhr.send(data); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment