Hoogle Search
Within LTS Haskell 24.69 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
getResponseHeaders :: forall (m :: Type -> Type) . MonadIO m => ActionT m ResponseHeadersscotty Web.Scotty.Trans Access the HTTP headers of the Response SINCE 0.21
setHeader :: forall (m :: Type -> Type) . MonadIO m => Text -> Text -> ActionT m ()scotty Web.Scotty.Trans Set one of the response headers. Will override any previously set value for that header. Header names are case-insensitive.
addHeader :: forall (m :: Type -> Type) . MonadIO m => Text -> Text -> ActionT m ()scotty Web.Scotty.Trans.Strict Add to the response headers. Header names are case-insensitive.
getResponseHeaders :: forall (m :: Type -> Type) . MonadIO m => ActionT m ResponseHeadersscotty Web.Scotty.Trans.Strict Access the HTTP headers of the Response SINCE 0.21
setHeader :: forall (m :: Type -> Type) . MonadIO m => Text -> Text -> ActionT m ()scotty Web.Scotty.Trans.Strict Set one of the response headers. Will override any previously set value for that header. Header names are case-insensitive.
-
skylighting-core Skylighting.Types No documentation available.
addBasicAuthHeader :: CI ByteString -> CI ByteString -> RequestBuilder site ()yesod-test Yesod.Test Adds a header for HTTP Basic Authentication to the request
Examples
request $ do addBasicAuthHeader "Aladdin" "OpenSesame"
addRequestHeader :: Header -> RequestBuilder site ()yesod-test Yesod.Test Adds the given header to the request; see Network.HTTP.Types.Header for creating Headers.
Examples
import Network.HTTP.Types.Header request $ do addRequestHeader (hUserAgent, "Chrome/41.0.2228.0")
-
yesod-test Yesod.Test Looks up the CSRF token stored in the cookie with the given name and adds it to the request headers. An error is thrown if the cookie can't be found. Use this function if you're using the CSRF middleware from Yesod.Core and have customized the cookie or header name. See Yesod.Core.Handler for details on this approach to CSRF protection.
Examples
import Data.CaseInsensitive (CI) request $ do addTokenFromCookieNamedToHeaderNamed "cookieName" (CI "headerName")
Since 1.4.3.2 assertHeader :: HasCallStack => CI ByteString -> ByteString -> YesodExample site ()yesod-test Yesod.Test Assert the given header key/value pair was returned.
Examples
{-# LANGUAGE OverloadedStrings #-} get HomeR assertHeader "key" "value"import qualified Data.CaseInsensitive as CI import qualified Data.ByteString.Char8 as BS8 getHomeR assertHeader (CI.mk (BS8.pack "key")) (BS8.pack "value")