curl-cookiejar-0.1.0.0: Parsing and pretty-printing of cURL/wget cookie jars

Safe HaskellNone
LanguageHaskell2010

Data.CURL.CookieJar.Conduit

Contents

Description

Conduit sourcessinks for NetscapeMozilla cookie jar format. |

Synopsis

Parsing cookie jars

parseCookiesC :: MonadThrow m => ConduitT ByteString Cookie m () Source #

Parse cookies from a cookie jar

Note that this does not skip the header

parseCookiesEitherC :: Monad m => ConduitT ByteString (Either ParseError Cookie) m () Source #

Parse cookies from a cookie jar, returning errors as values

sinkCookieJar :: MonadThrow m => ConduitT ByteString o m CookieJar Source #

Parse cookies into a cookie jar, and return the value

sinkCookieJarEither :: Monad m => ConduitT ByteString o m (Either ParseError CookieJar) Source #

Parse cookies into a cookie jar, and return the value, or a parse error

sourceCookieJarCookies :: Monad m => CookieJar -> ConduitT i Cookie m () Source #

Source cookies from a cookie jar

Pretty-printing cookie jars

prettyCookieC :: PrimMonad m => Cookie -> ConduitT i ByteString m () Source #

Pretty print a single cookie and stream out a chunked ByteString

prettyCookiesC :: PrimMonad m => CookieJarHeader -> ConduitT Cookie ByteString m () Source #

Stream in cookies to pretty-print, along with a header

prettyCookieJarC :: PrimMonad m => CookieJarHeader -> CookieJar -> ConduitT i ByteString m () Source #

Pretty-print a cookie jar

Handle and file IO

readCookieJarFileC :: MonadThrow m => MonadResource m => FilePath -> ConduitT i o m CookieJar Source #

Read a cookie jar from a file

readCookieJarHandleC :: MonadIO m => MonadThrow m => Handle -> ConduitT i o m CookieJar Source #

Read a cookie jar from a handle

sourceCookiesFile :: MonadThrow m => MonadResource m => FilePath -> ConduitT i Cookie m () Source #

Source cookies from a cookie jar file

sourceCookiesHandle :: MonadThrow m => MonadIO m => Handle -> ConduitT i Cookie m () Source #

Source cookies from a handle

sinkCookiesFile :: MonadResource m => PrimMonad m => CookieJarHeader -> FilePath -> ConduitT Cookie o m () Source #

Write cookies to a file

sinkCookiesHandle :: MonadIO m => PrimMonad m => CookieJarHeader -> Handle -> ConduitT Cookie o m () Source #

Write cookies to a handle

writeCookieJarFileC :: MonadResource m => PrimMonad m => CookieJarHeader -> CookieJar -> FilePath -> ConduitT i o m () Source #

Write a cookie jar to a file