commit
4eabab7e44
2 changed files with 3 additions and 3 deletions
|
@ -12,7 +12,7 @@ data RemoteHost deriving Typeable
|
||||||
|
|
||||||
-- $remotehost
|
-- $remotehost
|
||||||
--
|
--
|
||||||
-- | Use 'RemoteHost' whenever your request handlers need the host or IP address
|
-- Use 'RemoteHost' whenever your request handlers need the host or IP address
|
||||||
-- from which the client issued the HTTP request. The corresponding handlers
|
-- from which the client issued the HTTP request. The corresponding handlers
|
||||||
-- receive arguments of type @SockAddr@ (from @Network.Socket@).
|
-- receive arguments of type @SockAddr@ (from @Network.Socket@).
|
||||||
--
|
--
|
||||||
|
|
|
@ -45,7 +45,7 @@ import Prelude ()
|
||||||
import Prelude.Compat
|
import Prelude.Compat
|
||||||
|
|
||||||
-- | Response Header objects. You should never need to construct one directly.
|
-- | Response Header objects. You should never need to construct one directly.
|
||||||
-- Instead, use 'addOptionalHeader.
|
-- Instead, use 'addOptionalHeader'.
|
||||||
data Headers ls a = Headers { getResponse :: a
|
data Headers ls a = Headers { getResponse :: a
|
||||||
-- ^ The underlying value of a 'Headers'
|
-- ^ The underlying value of a 'Headers'
|
||||||
, getHeadersHList :: HList ls
|
, getHeadersHList :: HList ls
|
||||||
|
@ -125,7 +125,7 @@ instance OVERLAPPABLE_ ( KnownSymbol h, ToHttpApiData v
|
||||||
-- | @addHeader@ adds a header to a response. Note that it changes the type of
|
-- | @addHeader@ adds a header to a response. Note that it changes the type of
|
||||||
-- the value in the following ways:
|
-- the value in the following ways:
|
||||||
--
|
--
|
||||||
-- 1. A simple value is wrapped in "Headers [<hdr>]":
|
-- 1. A simple value is wrapped in "Headers '[hdr]":
|
||||||
--
|
--
|
||||||
-- >>> let example1 = addHeader 5 "hi" :: Headers '[Header "someheader" Int] String;
|
-- >>> let example1 = addHeader 5 "hi" :: Headers '[Header "someheader" Int] String;
|
||||||
-- >>> getHeaders example1
|
-- >>> getHeaders example1
|
||||||
|
|
Loading…
Reference in a new issue