make API call
How to make HTTP request
Fetch
fetch('https://api.mydomain.com').
then(response => response.json()).
then(data => this.setState({ data }));fetch('http://example.com/movies.json')
.then(function(response) {
return response.json();
})
.then(function(myJson) {
console.log(myJson);
});Fetching data from the server

AJAX
Axios
Last updated