Hoogle Search
Within LTS Haskell 24.46 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
setHeader :: HasHeaders r => String -> String -> r -> rhappstack-server Happstack.Server.Internal.Types Associates the key/value pair in the headers. Forces the key to be lowercase.
setHeaderBS :: HasHeaders r => ByteString -> ByteString -> r -> rhappstack-server Happstack.Server.Internal.Types Acts as setHeader but with ByteStrings.
setHeaderUnsafe :: HasHeaders r => ByteString -> HeaderPair -> r -> rhappstack-server Happstack.Server.Internal.Types Sets the key to the HeaderPair. This is the only way to associate a key with multiple values via the setHeader* functions. Does not force the key to be in lowercase or guarantee that the given key and the key in the HeaderPair will match.
setRsCode :: Monad m => Int -> Response -> m Responsehappstack-server Happstack.Server.Internal.Types Sets the Response status code to the provided Int and lifts the computation into a Monad.
setFilter :: FilterMonad a m => (a -> a) -> m ()happstack-server Happstack.Server.Monads Ignores all previous alterations to your filter As an example:
do composeFilter f setFilter g return "Hello World"
The setFilter g will cause the first composeFilter f to be ignored.setHeaderM :: FilterMonad Response m => String -> String -> m ()happstack-server Happstack.Server.Monads Set a header into the response. This will replace an existing header of the same name. Use addHeaderM if you want to add more than one header of the same name.
setResponseCode :: FilterMonad Response m => Int -> m ()happstack-server Happstack.Server.Response Set an arbitrary return code in your response. A filter for setting the response code. Generally you will use a helper function like ok or seeOther.
main = simpleHTTP nullConf $ do setResponseCode 200 return "Everything is OK"
see also: respsetHeader :: HasHeaders r => String -> String -> r -> rhappstack-server Happstack.Server.Types Associates the key/value pair in the headers. Forces the key to be lowercase.
setHeaderBS :: HasHeaders r => ByteString -> ByteString -> r -> rhappstack-server Happstack.Server.Types Acts as setHeader but with ByteStrings.
setHeaderUnsafe :: HasHeaders r => ByteString -> HeaderPair -> r -> rhappstack-server Happstack.Server.Types Sets the key to the HeaderPair. This is the only way to associate a key with multiple values via the setHeader* functions. Does not force the key to be in lowercase or guarantee that the given key and the key in the HeaderPair will match.