Finish changes for Raw now works with Enter

This commit is contained in:
Brandon Martin 2015-07-31 11:21:28 -06:00
parent 3165b43165
commit 3f454ad0d2
8 changed files with 14 additions and 10 deletions

View file

@ -1,6 +1,6 @@
HEAD
----
* Update `instance HasClient Raw` for servant Raw changes
* Support for the `HttpVersion`, `IsSecure`, `RemoteHost` and `Vault` combinators
* Added support for `path` on `BaseUrl`.
* `client` now takes an explicit `Manager` argument.

View file

@ -1,6 +1,6 @@
HEAD
----
* Update `instance HasDocs Raw` for servant Raw changes
* Support for the `HttpVersion`, `IsSecure`, `RemoteHost` and `Vault` combinators
* Support maximum samples setting with new `DocOptions` type (used by `docsWithOptions` and `docsWith`)
* Remove redundant second parameter of ToSample

View file

@ -34,7 +34,7 @@ server sHandler = socketIOHandler
:<|> serveDirectory "socket-io-chat/resources"
where
socketIOHandler req respond = toWaiApplication sHandler req respond
socketIOHandler = Raw $ toWaiApplication sHandler
app :: WaiMonad () -> Application

View file

@ -15,7 +15,7 @@ import Servant
import Servant.Docs
import qualified T3
type DocsAPI = T3.API :<|> Raw Apllication IO
type DocsAPI = T3.API :<|> Raw Application IO
instance ToCapture (Capture "x" Int) where
toCapture _ = DocCapture "x" "(integer) position on the x axis"
@ -62,8 +62,8 @@ docsBS = encodeUtf8
server :: Server DocsAPI
server = T3.server :<|> serveDocs
where serveDocs _ respond =
respond $ responseLBS ok200 [plain] docsBS
where serveDocs = Raw (\_ respond ->
respond $ responseLBS ok200 [plain] docsBS)
plain = ("Content-Type", "text/plain")

View file

View file

@ -1,6 +1,10 @@
HEAD
----
* Add `serveDirectoryWith` user can supply custom `StaticSettings`
* Update `serveDirectory` for servant Raw changes
* Add `class ToRawApplication` for servant Raw changes
* Update `instance Server Raw` for servant Raw changes
* Add `instance Enter Raw` for servant Raw changes
* Support for the `HttpVersion`, `IsSecure`, `RemoteHost` and `Vault` combinators
* Drop `EitherT` in favor of `ExceptT`

View file

@ -38,10 +38,10 @@ import Filesystem.Path.CurrentOS (decodeString)
-- behind a /\/static\// prefix. In that case, remember to put the 'serveDirectory'
-- handler in the last position, because /servant/ will try to match the handlers
-- in order.
serveDirectoryWith :: StaticSettings -> Server (Raw Application m)
serveDirectoryWith :: StaticSettings -> ServerT (Raw Application m) n
serveDirectoryWith settings = Raw (staticApp settings)
serveDirectory :: FilePath -> Server (Raw Application m)
serveDirectory :: FilePath -> ServerT (Raw Application m) n
serveDirectory = serveDirectoryWith . defaultFileServerSettings .
#if MIN_VERSION_wai_app_static(3,1,0)
id .

View file

@ -1,6 +1,6 @@
HEAD
----
* Change Raw from `data Raw ...` to `newtype Raw a (m :: * -> *) = Raw a ...`
* Add `HttpVersion`, `IsSecure`, `RemoteHost` and `Vault` combinators
* Fix safeLink, so Header is not in fact required.
* Added more instances for (:<|>)