What's Behind a Cookie?

In this lesson, we'll study how cookies are set, requested, and what directives they can have.

We'll cover the following...

A server can send a cookie using the Set-Cookie header.

HTTP/1.1 200 Ok
Set-Cookie: access_token=1234
...

A client will then store this data and send it in subsequent requests through the Cookie header.

GET / HTTP/1.1
Host: example.com
Cookie: access_token=1234
...

Note that servers can send multiple cookies at once,

HTTP/1.1 200 Ok
Set-Cookie:
...