Skip to content

Instantly share code, notes, and snippets.

@high5
Created March 13, 2015 03:00
Show Gist options
  • Save high5/da24d87fbe53ac41522f to your computer and use it in GitHub Desktop.
Save high5/da24d87fbe53ac41522f to your computer and use it in GitHub Desktop.
ajax request sample
$.ajax({
async:false,
cache:false,
type: "POST",
url: "/todos",
data: { title: text}
})
.done(function(msg) {
var id = msg;
_todos[id] = {
id: id,
complete: false,
text: text
};
})
.always(function( jqXHR, textStatus ) {
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment