haskell-servant/servant

Idea Symbolic Names for HTTP Status codes

Open

#628 创建于 2016年10月27日

在 GitHub 查看
 (9 评论) (1 反应) (0 负责人)Haskell (422 fork)batch import
enhancementhelp wantedservant-api

仓库指标

Star
 (1,953 star)
PR 合并指标
 (平均合并 5小时 49分钟) (30 天内合并 2 个 PR)

描述

I had a thought, currently to express a http status code you have to remember the number, would it be possible to have a named type for them. So instead of having the number 304 in my code I could ahve the value 'NotModified' which esp for some of the more unusual status codes would be very helpful in making code more readable.

For example if I see that something should return 415 I probably will have to look up what that means but if I see UnsupportedMediaType it is self documenting.

贡献者指南