Skip to content

Commit

Permalink
docs(http): prepare for noUncheckedIndexedAccess (#4453)
Browse files Browse the repository at this point in the history
  • Loading branch information
iuioiua authored Mar 8, 2024
1 parent 30561d8 commit 9743031
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions http/unstable_signed_cookie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export async function signCookie(
* Cookie: "location=tokyo.37f7481039762eef5cd46669f93c0a3214dfecba7d0cdc0b0dc40036063fb22e",
* });
* const signedCookie = getCookies(headers)["location"];
* if (signedCookie === undefined) throw new Error("Cookie not found");
* await verifyCookie(signedCookie, key);
* ```
*/
Expand Down Expand Up @@ -99,6 +100,7 @@ export async function verifyCookie(
* Cookie: "location=tokyo.37f7481039762eef5cd46669f93c0a3214dfecba7d0cdc0b0dc40036063fb22e",
* });
* const signedCookie = getCookies(headers)["location"];
* if (signedCookie === undefined) throw new Error("Cookie not found");
* await verifyCookie(signedCookie, key);
* const cookie = parseSignedCookie(signedCookie);
* ```
Expand Down

0 comments on commit 9743031

Please sign in to comment.