fetch API
e
The Fetch API provides an interface for fetching (sending/receiving) resources.
lleg
o
It uses Request and Response objects.
na C
The fetch() method is used to fetch a resource (data).
Ap
let promise = fetch( url , [options] )
Understanding Terms
e
AJAX is Asynchronous JS & XML
lleg
o
JSON is JavaScript Object Notation
na C
p
json() method : returns a second promise that resolves with the result of parsing the
A
response body text as JSON. (Input is JSON, output is JS object)
Requests & Response
e
HTTP Verbs
lleg
o
Response Status Code
na C
p
*HTTP response headers also contain details about the
A
responses, such as content type, HTTP status code etc.
Homework Task
e
Sending POST Request
lleg
a Co
Apn