Testing endpoints with dynamic segments
In the last video we created the logic for a new endpoint GET /items/:id, where the :id segment is dynamic. Let's now smoke test it with Postman.
To begin, we'll let's create a new request. The URL for this request is going to require a valid Mongo ID.
We can easily get one of these by first running the GET /items request, since each item returned will include it's ID. For example, I've gotten the value 5b45a2337510941e6cbe99ec.
Click to load comments...