-
-
Save andi1984/5463814 to your computer and use it in GitHub Desktop.
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
.get(url,callback); | |
.ajax { | |
type:'POST', //defaults to GET | |
url:'/api/getinfo', //defaults to window.location | |
contentType:'application/json', //defaults to application/x-www-form-urlencoded | |
headers:{}, | |
dataType:'application/json', //defaults to text/html | |
data:{username:foo}, //Can be a Key/Value pair string or object. If it's an object, $.serialize is called to turn it into a Key/Value pair string | |
success:function(data){}, //function to call on successful Ajax request | |
error:function(data){}, //function to call when an error exists in the Ajax request | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment