docs(http): prepare for noUncheckedIndexedAccess (#4453)

This commit is contained in:
Asher Gomez 2024-03-08 16:15:56 +11:00 committed by GitHub
parent 30561d8e60
commit 9743031bf0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);
* ```
*/
@ -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);
* ```