Skip to content

Instantly share code, notes, and snippets.

@ezhov-da
Last active March 10, 2019 12:20
Show Gist options
  • Save ezhov-da/ad1892df4971686898d68e0875fef432 to your computer and use it in GitHub Desktop.
Save ezhov-da/ad1892df4971686898d68e0875fef432 to your computer and use it in GitHub Desktop.
js jq jquery.ajax()
http://api.jquery.com/jquery.ajax/
[code:]js[:code]
$.ajax({
accepts: {
mycustomtype: 'application/x-some-custom-type'
},
// Instructions for how to deserialize a `mycustomtype`
converters: {
'text mycustomtype': function(result) {
// Do Stuff
return newresult;
}
},
// Expect a `mycustomtype` back from server
dataType: 'mycustomtype'
});
[/code]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment