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.

  1. getResponseHeaders :: forall (m :: Type -> Type) . MonadIO m => ActionT m ResponseHeaders

    scotty Web.Scotty.Trans

    Access the HTTP headers of the Response SINCE 0.21

  2. 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.

  3. 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.

  4. getResponseHeaders :: forall (m :: Type -> Type) . MonadIO m => ActionT m ResponseHeaders

    scotty Web.Scotty.Trans.Strict

    Access the HTTP headers of the Response SINCE 0.21

  5. 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.

  6. rLookahead :: Rule -> !Bool

    skylighting-core Skylighting.Types

    No documentation available.

  7. 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"
    

  8. 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")
    

  9. addTokenFromCookieNamedToHeaderNamed :: HasCallStack => ByteString -> CI ByteString -> RequestBuilder site ()

    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

  10. 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")
    

Page 195 of many | Previous | Next