Finish changes for Raw now works with Enter
This commit is contained in:
parent
3165b43165
commit
3f454ad0d2
8 changed files with 14 additions and 10 deletions
|
@ -1,6 +1,6 @@
|
||||||
HEAD
|
HEAD
|
||||||
----
|
----
|
||||||
|
* Update `instance HasClient Raw` for servant Raw changes
|
||||||
* Support for the `HttpVersion`, `IsSecure`, `RemoteHost` and `Vault` combinators
|
* Support for the `HttpVersion`, `IsSecure`, `RemoteHost` and `Vault` combinators
|
||||||
* Added support for `path` on `BaseUrl`.
|
* Added support for `path` on `BaseUrl`.
|
||||||
* `client` now takes an explicit `Manager` argument.
|
* `client` now takes an explicit `Manager` argument.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
HEAD
|
HEAD
|
||||||
----
|
----
|
||||||
|
* Update `instance HasDocs Raw` for servant Raw changes
|
||||||
* Support for the `HttpVersion`, `IsSecure`, `RemoteHost` and `Vault` combinators
|
* Support for the `HttpVersion`, `IsSecure`, `RemoteHost` and `Vault` combinators
|
||||||
* Support maximum samples setting with new `DocOptions` type (used by `docsWithOptions` and `docsWith`)
|
* Support maximum samples setting with new `DocOptions` type (used by `docsWithOptions` and `docsWith`)
|
||||||
* Remove redundant second parameter of ToSample
|
* Remove redundant second parameter of ToSample
|
||||||
|
|
|
@ -34,7 +34,7 @@ server sHandler = socketIOHandler
|
||||||
:<|> serveDirectory "socket-io-chat/resources"
|
:<|> serveDirectory "socket-io-chat/resources"
|
||||||
|
|
||||||
where
|
where
|
||||||
socketIOHandler req respond = toWaiApplication sHandler req respond
|
socketIOHandler = Raw $ toWaiApplication sHandler
|
||||||
|
|
||||||
|
|
||||||
app :: WaiMonad () -> Application
|
app :: WaiMonad () -> Application
|
||||||
|
|
|
@ -15,7 +15,7 @@ import Servant
|
||||||
import Servant.Docs
|
import Servant.Docs
|
||||||
import qualified T3
|
import qualified T3
|
||||||
|
|
||||||
type DocsAPI = T3.API :<|> Raw Apllication IO
|
type DocsAPI = T3.API :<|> Raw Application IO
|
||||||
|
|
||||||
instance ToCapture (Capture "x" Int) where
|
instance ToCapture (Capture "x" Int) where
|
||||||
toCapture _ = DocCapture "x" "(integer) position on the x axis"
|
toCapture _ = DocCapture "x" "(integer) position on the x axis"
|
||||||
|
@ -62,8 +62,8 @@ docsBS = encodeUtf8
|
||||||
server :: Server DocsAPI
|
server :: Server DocsAPI
|
||||||
server = T3.server :<|> serveDocs
|
server = T3.server :<|> serveDocs
|
||||||
|
|
||||||
where serveDocs _ respond =
|
where serveDocs = Raw (\_ respond ->
|
||||||
respond $ responseLBS ok200 [plain] docsBS
|
respond $ responseLBS ok200 [plain] docsBS)
|
||||||
|
|
||||||
plain = ("Content-Type", "text/plain")
|
plain = ("Content-Type", "text/plain")
|
||||||
|
|
||||||
|
|
0
servant-mock/CHANGELOG.md
Normal file
0
servant-mock/CHANGELOG.md
Normal file
|
@ -1,6 +1,10 @@
|
||||||
HEAD
|
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
|
* Support for the `HttpVersion`, `IsSecure`, `RemoteHost` and `Vault` combinators
|
||||||
* Drop `EitherT` in favor of `ExceptT`
|
* Drop `EitherT` in favor of `ExceptT`
|
||||||
|
|
||||||
|
|
|
@ -38,10 +38,10 @@ import Filesystem.Path.CurrentOS (decodeString)
|
||||||
-- behind a /\/static\// prefix. In that case, remember to put the 'serveDirectory'
|
-- 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
|
-- handler in the last position, because /servant/ will try to match the handlers
|
||||||
-- in order.
|
-- in order.
|
||||||
serveDirectoryWith :: StaticSettings -> Server (Raw Application m)
|
serveDirectoryWith :: StaticSettings -> ServerT (Raw Application m) n
|
||||||
serveDirectoryWith settings = Raw (staticApp settings)
|
serveDirectoryWith settings = Raw (staticApp settings)
|
||||||
|
|
||||||
serveDirectory :: FilePath -> Server (Raw Application m)
|
serveDirectory :: FilePath -> ServerT (Raw Application m) n
|
||||||
serveDirectory = serveDirectoryWith . defaultFileServerSettings .
|
serveDirectory = serveDirectoryWith . defaultFileServerSettings .
|
||||||
#if MIN_VERSION_wai_app_static(3,1,0)
|
#if MIN_VERSION_wai_app_static(3,1,0)
|
||||||
id .
|
id .
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
HEAD
|
HEAD
|
||||||
----
|
----
|
||||||
|
* Change Raw from `data Raw ...` to `newtype Raw a (m :: * -> *) = Raw a ...`
|
||||||
* Add `HttpVersion`, `IsSecure`, `RemoteHost` and `Vault` combinators
|
* Add `HttpVersion`, `IsSecure`, `RemoteHost` and `Vault` combinators
|
||||||
* Fix safeLink, so Header is not in fact required.
|
* Fix safeLink, so Header is not in fact required.
|
||||||
* Added more instances for (:<|>)
|
* Added more instances for (:<|>)
|
||||||
|
|
Loading…
Reference in a new issue