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

Safe Haskell | Safe
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

HasLink k sub => HasLink * ((:>) k * RemoteHost sub) # |
Associated Types type MkLink ((:>) k * RemoteHost sub) (endpoint :: (:>) k * RemoteHost sub) :: * # Methods toLink :: Proxy ((k :> *) RemoteHost sub) endpoint -> Link -> MkLink ((k :> *) RemoteHost sub) endpoint #
type MkLink * ((:>) k * RemoteHost sub) # |
type MkLink * ((:>) k * RemoteHost sub) = MkLink k sub