on 69041cc help sign in
23 lines 691 B history raw
1{-# LANGUAGE TypeFamilies #-}
2{-# LANGUAGE OverloadedStrings #-}
3module Servant.API.Raw where
5import Data.Proxy
6import Network.Wai
7import Servant.Docs
8import Servant.Server
10-- | Endpoint for plugging in your own Wai 'Application's.
11--
12-- The given 'Application' will get the request as received by the server, potentially with
13-- a modified (stripped) 'pathInfo' if the 'Application' is being routed with 'Servant.API.Sub.:>'.
14data Raw
16instance HasServer Raw where
17 type Server Raw = Application
18 route Proxy rawApplication request respond =
19 rawApplication request (respond . succeedWith)
21instance HasDocs Raw where
22 docsFor _proxy (endpoint, action) =
23 single endpoint action