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.
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.
gxHead :: GenericXMLString s => s -> Charhexpat Text.XML.Expat.Annotated No documentation available.
gxHead :: GenericXMLString s => s -> Charhexpat Text.XML.Expat.Extended No documentation available.
-
hexpat Text.XML.Expat.Format The standard XML header with UTF-8 encoding.
gxHead :: GenericXMLString s => s -> Charhexpat Text.XML.Expat.SAX No documentation available.
gxHead :: GenericXMLString s => s -> Charhexpat Text.XML.Expat.Tree No documentation available.
-
hsemail Text.Parsec.Rfc2822 Like header, but allows the obsolete white-space rules.
buildHeaders :: [(ByteString, ByteString)] -> Headershttp-common Network.Http.Types Given a list of field-name,field-value pairs, construct a Headers map.
-
http-common Network.Http.Types No documentation available.
getHeader :: Response -> ByteString -> Maybe ByteStringhttp-common Network.Http.Types Lookup a header in the response. HTTP header field names are case-insensitive, so you can specify the name to lookup however you like. If the header is not present Nothing will be returned.
let n = case getHeader p "Content-Length" of Just x' -> read x' :: Int Nothing -> 0
which of course is essentially what goes on inside the client library when it receives a response from the server and has to figure out how many bytes to read. There is a fair bit of complexity in some of the other HTTP response fields, so there are a number of specialized functions for reading those values where we've found them useful.