Redirections in Servant
问题 What's the appropriate way to make a Servant handler respond with a redirection? I am working in a navigation REST app and I would like to respond to POST requests that create resources with a redirection to the corresponding GET resource list paths. So for instance POST /foos should redirect to GET /foos after creating a foo. I could not find a clear way to do that in the documentation. 回答1: There is one simple (but slightly hacky) answer, and a lead for making the first option obsolete