No description
a551eb62e2
This is a reasonably simple attempt at fixing #460. By moving the accept check to a place before the body check, we can make it recoverable (the body check is irreversible, so everything done after the body check has to fail fatally). The advantage is that we can now specify routes offering different content types modularly. Failure to match one is not fatal, and will result in subsequent routes being tried. The disadvantage is that we hereby bump the error priority of the 406 status code. If a request contains a bad accept header and a bad body, we now get 406 rather than 400. This deviates from the HTTP decision diagram we try to follow, but seems like an acceptable compromise for now. |
||
---|---|---|
doc | ||
scripts | ||
servant | ||
servant-blaze | ||
servant-cassava | ||
servant-client | ||
servant-docs | ||
servant-foreign | ||
servant-js | ||
servant-lucid | ||
servant-mock | ||
servant-server | ||
.gitignore | ||
.stylish-haskell.yaml | ||
.travis.yml | ||
CONTRIBUTING.md | ||
HLint.hs | ||
README.md | ||
servant.png | ||
sources.txt | ||
stack-ghc-7.8.4.yaml | ||
stack.yaml | ||
travis.sh |
servant - A Type-Level Web DSL
Getting Started
We have a tutorial that introduces the core features of servant. After this article, you should be able to write your first servant webservices, learning the rest from the haddocks' examples.
Other blog posts, videos and slides can be found on the website.
If you need help, drop by the IRC channel (#servant on freenode) or mailing list.
Contributing
See CONTRIBUTING.md