HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
The Fetch API provides a JavaScript interface for accessing and manipulating parts of the protocol, such as requests and responses.
The fetch()
method starts the process of fetching a resource from a server.
The fetch()
method returns a Promise that resolves to a Response object.
No need for XMLHttpRequest anymore.
Parameter | Description |
file | Optional. The name of a resource to fetch. |
Type | Description |
Promise | A Promise that resolves to a Response object. |
fetch()
is an ECMAScript6 (ES6) feature.
ES6 (JavaScript 2015) is supported in all modern browsers:
fetch()
is not supported in Internet Explorer 11 (or earlier).