HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

Moduleservant-0.20.3.0Haskell2010

Servant.API.RemoteHost

Synopsis
  • 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 '[] ()