Created
October 17, 2017 15:12
-
-
Save otnansirk/cb6f9ddee51693cbf3f4ba63bd70f482 to your computer and use it in GitHub Desktop.
ajax.js
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
$.ajax({ | |
url: "https://newsapi.org/v1/articles?source=the-next-web&sortBy=latest&apiKey=e9717e4bd91642dabcdec078ea76c03e", | |
json: "callback", | |
dataType: "json", | |
success: function( response ) { | |
$.each(response.articles, function(i, data){ | |
console.log(data); // server response | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment