Skip to content

zmthy/snap-accept

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

snap-accept

Build Status

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 = acceptsMedia
    [ ("text/html", sendHtml)
    , ("application/json", sendJson)
    ] <|> send406Error