Skip to content

Commit

Permalink
request: Update remove cookie doc (#559)
Browse files Browse the repository at this point in the history
* request: Update remove cookie doc

* wip

* Format Rust code using rustfmt

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
chrislearn and github-actions[bot] authored Dec 13, 2023
1 parent a443aca commit 4d34eaf
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions crates/core/src/http/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,13 +298,17 @@ impl Response {

/// Helper function for remove cookie.
///
/// Removes `cookie` from this CookieJar. If an _original_ cookie with the same
/// Removes `cookie` from this [`CookieJar`]. If an _original_ cookie with the same
/// name as `cookie` is present in the jar, a _removal_ cookie will be
/// present in the `delta` computation.
/// present in the `delta` computation. **To properly generate the removal
/// cookie, `cookie` must contain the same `path` and `domain` as the cookie
/// that was initially set.**
///
/// A "removal" cookie is a cookie that has the same name as the original
/// cookie but has an empty value, a max-age of 0, and an expiration date
/// far in the past. Read more about [removal cookies](https://docs.rs/cookie/0.16.1/cookie/struct.CookieJar.html#method.remove).
/// far in the past.
///
/// Read more about [removal cookies](https://docs.rs/cookie/0.18.0/cookie/struct.CookieJar.html#method.remove).
#[inline]
pub fn remove_cookie(&mut self, name: &str) -> &mut Self
{
Expand Down

0 comments on commit 4d34eaf

Please sign in to comment.