Skip to main content

parse_cookie

Function parse_cookie 

Source
pub fn parse_cookie<'a>(cookie_str: &'a str, name: &str) -> Option<&'a str>
Expand description

Parse a named cookie from a raw Cookie header value.

The cookie header value is like "session=abc; access_token=tok123; other=xyz". Returns the value for the first matching key, or None if not found.

This is exported so that the #[derive(PlexusRequest)] generated code can call it.