PostCreated is a Servant response type for a successful resource-creation request. It declares HTTP status 201 and can describe a JSON response, such as the new resource's integer ID. section 17.1.1
Todo-list creation endpoint
A POST request to /add accepts a JSON-encoded TodoEntry and returns the created entry's ID with status 201. section 17.1.1
"add" :> ReqBody '[JSON] TodoEntry :> PostCreated '[JSON] Int
This endpoint combines a path, a JSON request body, and a PostCreated JSON response carrying an Int. section 17.1.1
