Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Fetch

The fetch() method in JavaScript is used to request to the server and load 
the information on the webpages. The request can be of any APIs that return 
the data of the format JSON or XML. 

This method returns a promise.

fetch('http://example.com/movies.json')
  .then((response) => response.json())
  .then((data) => console.log(data));
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #Fetch
ADD COMMENT
Topic
Name
4+9 =