HORIZON HASKELLDocslts/ghc-9.14.x3e2d5682026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 3e2d568 · 2026-10-11

Moduleservant-0.20.3.0Haskell2010

Servant.API.RemoteHost

  • 1 type
  • Packageservant-0.20.3.0
  • Exports1
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceRemoteHost.hs

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:

Example2 expressions
-- POST /record-iptype API = "record-ip" :> RemoteHost :> Post '[] ()
datadata RemoteHost
#

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

Instances2HasLink, MkLink