Skip to main content

parse

Function parse 

Source
pub fn parse<R: BufRead>(reader: R) -> Result<Vec<Cookie>, ParseError>
Expand description

Parses all valid cookie lines from a buffered reader.

One leading dot is removed from the domain field. Path fields are preserved as they appear in the file, except that curl’s #HttpOnly_ line marker is represented as Cookie::http_only. curl’s legacy missing-path records are accepted with / as the path.

The first malformed cookie line or I/O error stops parsing and returns a ParseError with the 1-based line number.