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]
);

PHP-HTTP

Navigation

  • 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

Related Topics

  • Documentation overview
    • Plugins
      • Previous: Content-Type Plugin
      • Next: Decoder Plugin

Quick search

©2015, The PHP-HTTP Team. | Powered by Sphinx 4.2.0 & Alabaster 0.7.13 | Page source