8000 Add cookie documentation · shulard/documentation@d61e497 · GitHub
[go: up one dir, main page]

Skip to content

Commit d61e497

Browse files
committed
Add cookie documentation
1 parent a97c580 commit d61e497

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

plugins/cookie.rst

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
11
Cookie Plugin
22
=============
33

4-
TODO: explain the cookie plugin
4+
Cookie plugins allow you to sore cookies information in a `CookieJar` and reuses them on consequent requests according
5+
to `RFC 6265`_ specification::
6+
7+
use Http\Discovery\HttpClientDiscovery;
8+
use Http\Message\CookieJar;
9+
use Http\Plugins\PluginClient;
10+
use Http\Plugins\CookiePlugin;
11+
12+
$cookiePlugin = new CookiePlugin(new CookieJar());
13+
14+
$pluginClient = new PluginClient(
15+
HttpClientDiscovery::find(),
16+
[$cookiePlugin]
17+
);
18+
19+
.. _RFC 6265: https://tools.ietf.org/html/rfc6265

0 commit comments

Comments
 (0)
0