API - Application Program Interface
It is a set of functions and procedures that allow the creation of applications which access the features or data of an operating system, application, or other service.what i understood..
It is like a middle ware between user and the database ( can made from java/PHP/java script) .Not giving the full access to the user
Hiding the real data ( like a SQL view or can be real data too)
in web services we use " ajax " to access the database through API ( not always )
user uses --> ajax --> to access API -->database
AJAX - Asynchronous JavaScript and XML
In a nutshell, it is the use of the XMLHttpRequest object to communicate with server-side scripts. It can send as well as receive information in a variety of formats, including JSON, XML, HTML, and even text files
AJAX is a developer's dream, because you can:
- Update a web page without reloading the page
- Request data from a server - after the page has loaded
- Receive data from a server - after the page has loaded
- Send data to a server - in the background
what is learnt in lab class..
Write a function to call GitHub API (https://api.github.com/users) and get users and return the users to the caller.
function getSomething() {
$.ajax({
url: 'https://api.github.com/users',
method: 'POST',
success: function (data) {
console.log(data);
},
error: function (data) {
console.log(data);
}
});
};
getSomething();
$.ajax({
url: 'https://api.github.com/users',
method: 'POST',
success: function (data) {
console.log(data);
},
error: function (data) {
console.log(data);
}
});
};
getSomething();
LuckyClub - LuckyClub Live Casino Review 2021
ReplyDeleteLucky Club is a great way to try our new game and try out the latest slots. This luckyclub game allows you to experience more than just slots. The