We can get a list of all of the snippets, as before.
We can control the format of the response that we get back, either by using the header:
Similarly, we can control the format of the request that we send, using the header.
If you add a switch to the requests above, you will be able to see the request type in request headers.
Because the API chooses the content type of the response based on the client request, it will, by default, return an HTML-formatted representation of the resource when that resource is requested by a web browser. This allows for the API to return a fully web-browsable HTML representation.
Having a web-browsable API is a huge usability win, and makes developing and using your API much easier. It also dramatically lowers the barrier-to-entry for other developers wanting to inspect and work with your API.