PHP-HTTP
latest
  • PHP-HTTP

HTTPlug

  • Introduction
  • Usage
  • Exceptions
  • Tutorial
  • Migrating
  • Clients & Adapters
  • Plugins
    • Introduction
    • Building Custom Plugins
    • Seekable Body Plugins
    • Authentication Plugin
    • Cache Plugin
    • Content-Length Plugin
    • Content-Type Plugin
    • Cookie Plugin
    • Decoder Plugin
    • Error Plugin
    • Header Plugins
    • History Plugin
    • Logger Plugin
    • Query plugin
    • Redirect Plugin
    • Request URI Manipulations
    • Retry Plugin
    • Stopwatch Plugin
    • VCR Plugin - Record and Replay Responses
  • Framework Integrations
  • Backwards compatibility

Components

  • Message
  • Client Common
  • Adapter Integration Tests
  • Promise
  • Discovery
  • Multipart Stream Builder

---------

  • Development
PHP-HTTP
  • »
  • Plugins »
  • Cookie Plugin
  • Edit on GitHub

Cookie PluginΒΆ

The CookiePlugin allow you to store cookies in a CookieJar and reuse them on consequent requests according to RFC 6265#section-4 specification:

use Http\Discovery\HttpClientDiscovery;
use Http\Message\CookieJar;
use Http\Client\Common\PluginClient;
use Http\Client\Common\Plugin\CookiePlugin;

$cookiePlugin = new CookiePlugin(new CookieJar());

$pluginClient = new PluginClient(
    HttpClientDiscovery::find(),
    [$cookiePlugin]
);
Previous Next

© Copyright 2015, The PHP-HTTP Team. Revision 0fc5c6c7.

Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: latest
Versions
latest
Downloads
pdf
On Read the Docs
Project Home
Builds