Practice Assignment: JavaScript Functions with Fetch API

What are the functions that need to be created in this JavaScript assignment?

The functions that need to be created in this JavaScript assignment are: 1. getAllPosts 2. getAllUsers 3. getComments 4. getUser 5. getTodosForUser

Function Descriptions:

getAllPosts: This function uses the Fetch API with Async/Await to request all the posts from the API endpoint https://jsonplaceholder.typicode.com/posts. It then returns the response as JSON data. getAllUsers: This function uses the Fetch API with Async/Await to request all the users from the API endpoint https://jsonplaceholder.typicode.com/users. It also returns the response as JSON data. getComments: This function accepts a "postID" parameter and uses the Fetch API with Async/Await to request all the comments for the specified postID from the API endpoint https://jsonplaceholder.typicode.com/comments. It then returns the comments for the requested postID as JSON data. getUser: This function accepts a "userID" parameter and uses the Fetch API with Async/Await to request the data for the specified user from the API endpoint https://jsonplaceholder.typicode.com/users/{userID}. It returns the response as JSON data. getTodosForUser: This function accepts a "userID" parameter and uses the Fetch API with Async/Await to request all the todos for the specified user from the API endpoint https://jsonplaceholder.typicode.com/users/{userID}/todos. It returns the response as JSON data.
← Exciting ipv6 dhcp relay configuration on router r2 Factory resetting an android phone the ultimate guide →