Skip to content

Instantly share code, notes, and snippets.

@wcc526
Created September 26, 2015 12:09
Show Gist options
  • Save wcc526/bcde79239dacdeae65df to your computer and use it in GitHub Desktop.
Save wcc526/bcde79239dacdeae65df to your computer and use it in GitHub Desktop.
ajax
$.ajax({
    url: "http://query.yahooapis.com/v1/public/yql",
    // the name of the callback parameter, as specified by the YQL service
    jsonp: "callback",
    // tell jQuery we're expecting JSONP
    dataType: "jsonp",
    // tell YQL what we want and that we want JSON
    data: {
        q: "show tables",
        format: "json",
        diagnostics: true,
    },
    // work with the response
    success: function( response ) {
        console.log( response ); // server response
    }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment