Fetching a list of items

For fetching a list of items in the shopping cart, we will register the /restapi/get-cart-items endpoint:

r.Handle("/restapi/get-cart-items", endpoints.GetShoppingCartItemsEndpoint(env)).Methods("GET")

This endpoint will be handled by the GetShoppingCartItemsEndpoint handler function. This endpoint is responsible for encoding the shopping cart as JSON encoded data and providing it to the client-side application. Note that we use the HTTP GET method to call this endpoint.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.50.156