Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Accept header branching for the Snap web framework
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src/Snap
.gitignore
LICENSE
README.md
Setup.hs
snap-accept.cabal

README.md

Complete content-type functionality as a complement to Snap's method and methods. Branches based on the value of the Accept header of a request, automatically setting the Content-Type header of the response.

route = accept "text/html" sendHtml
    <|> accept "application/json" sendJson
    <|> send406Error
Something went wrong with that request. Please try again.