Getting the Shopping List

We can get the Shopping List that we just created by making a GET request to the items with the ID of the item, and we should get back the JSON representation of the Shopping List. The following is a screenshot of the GET request; you can see the same JSON object being returned as part of the Response:

We can also make a GET request to /shopping_list to get all of the Shopping Lists. Instead of getting one object in the Response, we will get back an array of objects:

Get Hands-On Full-Stack Development with Swift now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.