mirror of
https://github.com/denoland/std.git
synced 2024-11-21 20:50:22 +00:00
docs(http): prepare for noUncheckedIndexedAccess
(#4453)
This commit is contained in:
parent
30561d8e60
commit
9743031bf0
@ -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);
|
||||
* ```
|
||||
|
Loading…
Reference in New Issue
Block a user