| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Web.Cookie.Jar
Description
Parser for a Netscape/Mozilla cookie jar
Provides parsing functions that parse the Netscape/Mozilla cookie jar file
format, along wiht that provide an incomplete roundtrip with the
parser.Builders
The roundtrip is incomplete because some of the fields in Cookie are not saved
in the Netscape/Mozilla cookie jar; see cookieBuilder.
Synopsis
- writeJar :: FilePath -> CookieJar -> IO ()
- writeJar' :: Builder -> FilePath -> CookieJar -> IO ()
- writeNetscapeJar :: FilePath -> CookieJar -> IO ()
- readJar :: FilePath -> IO (Either String CookieJar)
- cookieJarParser :: Parser CookieJar
- cookieParser :: Parser Cookie
- parseCookieJar :: ByteString -> Either String CookieJar
- netscapeJarBuilder :: CookieJar -> Builder
- jarBuilder :: CookieJar -> Builder
- jarBuilder' :: Builder -> CookieJar -> Builder
- cookieBuilder :: Cookie -> Builder
- parseOnly :: Parser a -> ByteString -> Either String a
read/write Cookie Jar files
writeJar :: FilePath -> CookieJar -> IO () Source #
Writes a cookie jar to the given path in the Netscape/Mozilla format, with no header
writeJar' :: Builder -> FilePath -> CookieJar -> IO () Source #
Like writeJar, but outputs a header before the cookie lines
writeNetscapeJar :: FilePath -> CookieJar -> IO () Source #
Like writeJar, but outputs the Netscape header before the cookie lines
Cookie jar format
parsing
cookieJarParser :: Parser CookieJar Source #
Parser for a cookie jar in the Netscape/Mozilla format
cookieParser :: Parser Cookie Source #
parseCookieJar :: ByteString -> Either String CookieJar Source #
Parse a ByteString containing a cookie jar in the Netscape/Mozilla format
printing
netscapeJarBuilder :: CookieJar -> Builder Source #
Like jarBuilder but outputs the Netscape header before the cookie lines
jarBuilder :: CookieJar -> Builder Source #
Print a cookie jar in the Netscape/Mozilla format, with no header
jarBuilder' :: Builder -> CookieJar -> Builder Source #
Like jarBuilder but outputs a header before the cookie lines
cookieBuilder :: Cookie -> Builder Source #
Builder for one cookie; generates a single line in the Cookie Jar file format
the values of the following fields are not output, as the file format does support them.
cookie_creation_timecookie_last_access_timecookie_persistent
re-exports
parseOnly :: Parser a -> ByteString -> Either String a #