servant-0.20.2: A family of combinators for defining webservices APIs

Safe Haskell | None
Language | Haskell2010

Servant.API.RemoteHost

Synopsis

- data RemoteHost

# Documentation

Use `RemoteHost` whenever your request handlers need the host or IP address from which the client issued the HTTP request. The corresponding handlers receive arguments of type `SockAddr` (from `Network.Socket`).

Example:

    >>> -- POST /record-ip
    >>> type API = "record-ip" :> RemoteHost :> Post '[] ()

data RemoteHost #

Provides access to the host or IP address from which the HTTP request was sent.

#### Instances

Instances details

HasLink sub => HasLink (RemoteHost :> sub :: Type) # |
Instance details Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (RemoteHost :> sub) -> Link -> MkLink (RemoteHost :> sub) a #
type MkLink (RemoteHost :> sub :: Type) a # |
Instance details Defined in Servant.Links type MkLink (RemoteHost :> sub :: Type) a = MkLink sub a