Spock 0.4.3.5 → 0.4.4.0
raw patch · 2 files changed
+15/−3 lines, 2 filesdep +blaze-htmldep +digestive-functors
Dependencies added: blaze-html, digestive-functors
Files
- Spock.cabal +4/−2
- src/Web/Spock.hs +11/−1
Spock.cabal view
@@ -1,5 +1,5 @@ name: Spock-version: 0.4.3.5+version: 0.4.4.0 synopsis: Another Haskell web toolkit based on scotty description: This toolbox provides everything you need to get a quick start into web hacking with haskell: sessions, cookies, database helper, csrf-protection, global state and the power of scotty Homepage: https://github.com/agrafix/Spock@@ -45,7 +45,9 @@ pool-conduit ==0.1.*, vault ==0.3.*, path-pieces ==0.1.*,- hashable ==1.2.*+ hashable ==1.2.*,+ blaze-html ==0.7.*,+ digestive-functors ==0.7.* ghc-options: -Wall -fno-warn-orphans source-repository head
src/Web/Spock.hs view
@@ -20,11 +20,13 @@ , safeActionPath -- * General Routing , get, post, put, delete, patch, addroute, Http.StdMethod (..)+ -- * Digestive Functors+ , runForm -- * Other reexports from scotty , middleware, matchAny, notFound , request, reqHeader, body, param, params, jsonData, files , status, addHeader, setHeader, redirect- , text, html, file, json, source, raw+ , text, html, blaze, file, json, source, raw , raise, rescue, next , RoutePattern -- * Spock utilities@@ -39,11 +41,14 @@ import Web.Spock.Types import Web.Spock.Cookie import Web.Spock.SafeActions+import Web.Spock.Digestive import Control.Applicative import Control.Monad.Trans.Reader import Control.Monad.Trans.Resource import Data.Pool+import Text.Blaze.Html (Html)+import Text.Blaze.Html.Renderer.Text (renderHtml) import Web.Scotty.Trans import Web.PathPieces import qualified Network.HTTP.Types as Http@@ -79,6 +84,11 @@ do middleware (sm_middleware sessionMgr) hookSafeActions defs++-- | Output html built with blaze+blaze :: Html -> SpockAction conn sess st ()+blaze htmlVal =+ html $ renderHtml htmlVal -- | Write to the current session. Note that all data is stored on the server. -- The user only reciedes a sessionId to be identified.