Hoogle Search
Within LTS Haskell 24.58 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
gogol-core Gogol.Prelude No documentation available.
class
BuildHeadersTo (hs :: [Type])gogol-core Gogol.Prelude No documentation available.
-
gogol-core Gogol.Prelude No documentation available.
class
HasResponseHeader (h :: Symbol) a (headers :: [Type])gogol-core Gogol.Prelude No documentation available.
pattern
MissingHeader :: () => ResponseHeader sym agogol-core Gogol.Prelude No documentation available.
pattern
UndecodableHeader :: () => ByteString -> ResponseHeader sym agogol-core Gogol.Prelude No documentation available.
-
gogol-core Gogol.Prelude addHeader adds a header to a response. Note that it changes the type of the value in the following ways:
- A simple value is wrapped in "Headers '[hdr]":
>>> let example0 = addHeader 5 "hi" :: Headers '[Header "someheader" Int] String; >>> getHeaders example0 [("someheader","5")]- A value that already has a header has its new header *prepended* to the existing list:
>>> let example1 = addHeader 5 "hi" :: Headers '[Header "someheader" Int] String; >>> let example2 = addHeader True example1 :: Headers '[Header "1st" Bool, Header "someheader" Int] String >>> getHeaders example2 [("1st","true"),("someheader","5")]Note that while in your handlers type annotations are not required, since the type can be inferred from the API type, in other cases you may find yourself needing to add annotations. -
gogol-core Gogol.Prelude Same as addHeader but works with Header', so it's possible to use any mods.
buildHeadersTo :: BuildHeadersTo hs => [Header] -> HList hsgogol-core Gogol.Prelude No documentation available.
getHeaders :: GetHeaders ls => ls -> [Header]gogol-core Gogol.Prelude No documentation available.