Skip to content

docs: add missing verb for cookies.set() explanation #437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 20, 2023

Conversation

Zerotask
Copy link
Contributor

No description provided.

@vercel
Copy link

vercel bot commented Jul 18, 2023

@Zerotask is attempting to deploy a commit to the Svelte Team on Vercel.

A member of the Team first needs to authorize it.

@Conduitry
Copy link
Member

I think "you" -> "use" sounds better to me here than "you" -> "you call", but I'm not sure what sort of style we're using in the rest of this tutorial.

@Zerotask
Copy link
Contributor Author

Zerotask commented Jul 18, 2023

I think "you" -> "use" sounds better to me here than "you" -> "you call", but I'm not sure what sort of style we're using in the rest of this tutorial.

Personally I don't like the double "u".
In the following the verb "call" is used, e.g.

Calling `cookies.set(name, ...)` causes a `Set-Cookie` header to be written, but it _also_ updates the internal map of cookies, meaning any subsequent calls to `cookies.get(name)` during the same request will return the updated value. Under the hood, the `cookies` API uses the popular `cookie` package — the options passed to `cookies.get` and `cookies.set` correspond to the `parse` and `serialize` options from the `cookie` [documentation](https://github.com/jshttp/cookie#api). SvelteKit sets the following defaults to make your cookies more secure:

I think "write" is probably the best, since you don't use or call it yourself, you just write it and then later on, it got called/executed.

@dummdidumm dummdidumm merged commit 51b54dd into sveltejs:main Jul 20, 2023
@Zerotask Zerotask deleted the patch-1 branch July 20, 2023 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants