Assalamualaikum!

I am Nizam

Student of Batch 07

Module 33 Practice

Video 33-1 How does internet work, HTTP Vs HTTPs and What is an API

Video 33-2 Intro to JSON, JSON Structure, parse, stringify

Video 33-3 JSON placeholder, GET data, display data on UI

Video 33-4 Load more data, more APIs, send data to function

Video 33-5 Dynamically display loaded data on your website

Video 33-6 Load posts and display on the website with CSS

All Posts are here

Video 33-7 GET, POST, PATCH, DELETE, CRUD, GET Vs POST

Video 33-8 Debug API, Network tab,Status code, headers, bad API

33-9 Module Summary and two homeworks

All my todos here

QUIZ

Q1: API stands for-
Ans: Application Programming Interface

Q2: Fill in the gap. fetch('https://jsonplaceholder.typicode.com/todo/1') .then(response => response ____?___ ).then(json => console.log(json))
Ans: .json()

Q3: ____?____('https://jsonplaceholder.typicode.com/posts/1') .then(res => res.json()) .then(json => console.log(json));
Ans: fetch

Q4: What will be the output? const stuInfo = JSON.stringify({ name: "James", roll: 3 }); console.log(stuInfo.name);
Ans: undefined

Q5: What is the full form of JSON ?
Ans: JavaScript Object Notation

Q6: What do you think about why we use the POST method ? (If needed, google it!)
Ans: To send some data to the server

Q7: headers: { 'Content-type':___?___ }, What will be “Content-Type ” if you want to send data in JSON format?
Ans: 'application/json'

Q8: Which method will you use if you need to update a particular data?
Ans: PATCH

Q9: What status code will you get If the API is not available
Ans: 404

Q10: What status code will you get for a successful API call? (If needed , google it!)
Ans: 200

THE END