@@ -18,13 +18,21 @@ import Servant.Server
19-- The given 'Application' will get the request as received by the server, potentially with
19-- The given 'Application' will get the request as received by the server, potentially with
20-- a modified (stripped) 'pathInfo' if the 'Application' is being routed with 'Servant.API.Sub.:>'.
20-- a modified (stripped) 'pathInfo' if the 'Application' is being routed with 'Servant.API.Sub.:>'.
22+-- In addition to just letting you plug in your existing WAI 'Application's,
23+-- this can also be used with 'Servant.Utils.StaticFiles.serveDirectory' to serve
24+-- static files stored in a particular directory on your filesystem, or to serve
25+-- your API's documentation with 'Servant.Utils.StaticFiles.serveDocumentation'.
28+-- | Just pass the request to the underlying application and serve its response.
23instance HasServer Raw where
29instance HasServer Raw where
24 type Server Raw = Application
30 type Server Raw = Application
25 route Proxy rawApplication request respond =
31 route Proxy rawApplication request respond =
26 rawApplication request (respond . succeedWith)
32 rawApplication request (respond . succeedWith)
34+-- | Pick a 'Method' and specify where the server you want to query is. You get
35+-- back the status code and the response body as a 'ByteString'.
28instance HasClient Raw where
36instance HasClient Raw where
29 type Client Raw = Method -> BaseUrl -> EitherT String IO (Int, ByteString)
37 type Client Raw = Method -> BaseUrl -> EitherT String IO (Int, ByteString)