Assignment
1. Extend your webserver
In the session, you added plenty of useful routes to your API, but let's not stop there!
Add 3 new routes
Think of 3 new useful routes yourself, and implement them.
Extend the home route
Routes don't only have to return text or JSON, they can also return HTML content to be displayed in the browser.
Update the
/route to return a HTML page that fetches the count value from the/user-countroute you've implemented previously. Style the HTML so it displays in a visually pleasing way. Now you've created a nice page to view the total number of users in your database!
2. Practice using Postman
Who doesn't love dogs? Ok... save the cat vs dog debate until after you've completed this exercise!
You'll be using the Dog API, where you can retrieve lots of doggy pictures. You can find the documentation on their website dog.ceo/dog-api.
You should create a collection in Postman, and set up requests for each of these tasks:
Get 5 random dog images (any breed)
List all the dog breeds
Get 3 dog images from the "beagle" breed
List all the sub-breeds of the poodle
Get all the dog images from the "toy poodle" sub breed
Share the link to your saved Postman Collection as part of submitting this assignment.
Last updated