0% found this document useful (0 votes)
12 views5 pages

Lecture 13

The Fetch API provides an interface for sending and receiving resources using Request and Response objects, with the fetch() method primarily used for GET requests. It also covers key terms such as AJAX and JSON, and explains the json() method for parsing responses. Additionally, Postman is introduced as a popular tool for API testing, offering resources for installation and further practice.

Uploaded by

Muqadas Hassan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views5 pages

Lecture 13

The Fetch API provides an interface for sending and receiving resources using Request and Response objects, with the fetch() method primarily used for GET requests. It also covers key terms such as AJAX and JSON, and explains the json() method for parsing responses. Additionally, Postman is introduced as a popular tool for API testing, offering resources for installation and further practice.

Uploaded by

Muqadas Hassan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 5

JAVASCRIPT

FETCH API
FETCH API

 Provides an interface for fetching (sending/receiving) resources.


 It uses Request and Response objects.
 The fetch() method is used to fetch a resource (data).

let promise = fetch(url, [options])


 If we are not sending any options, then the fetch method works on GET request type.
UNDERSTANDING TERMS

 AJAX is Asynchronous JS & XML


 JSON is Javascript Object Notation
 json() method: returns a second promise that resolves with the result of parsing the
response body text as JSON. (Input is JSON and outpt is JS object).
 Therefore json() is also asynchronous.
REQUESTS AND RESPONSE

 HTTP Verbs (GET, POST etc.)


 Response Status Code
 HTTP response headers also contain details about the responses, such as content type,
HTTP status codeetc.
INTRODUCTION TO POSTMAN

 Postman is one of the most popular software testing tools which is used for API testing.
 With the help of this tool, developers can easily create, test, share, and document APIs.
 Installation:
 https://www.postman.com/product/tools/

 For further practice:


 https://github.com/vdespa/introduction-to-postman-course/blob/main/course-notes.md
 https://www.youtube.com/watch?v=VywxIQ2ZXw4

You might also like