PHPackages                             amphp/http-client-cookies - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. amphp/http-client-cookies

ActiveLibrary[HTTP &amp; Networking](/categories/http)

amphp/http-client-cookies
=========================

Automatic cookie handling for Amp's HTTP client.

v2.0.0(2y ago)14750.8k—2.9%410MITPHPPHP &gt;=8.1

Since Aug 13Pushed 2y ago6 watchersCompare

[ Source](https://github.com/amphp/http-client-cookies)[ Packagist](https://packagist.org/packages/amphp/http-client-cookies)[ Docs](https://github.com/amphp/http-client-cookies)[ GitHub Sponsors](https://github.com/amphp)[ RSS](/packages/amphp-http-client-cookies/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelog (10)Dependencies (13)Versions (13)Used By (10)

amphp/http-client-cookies
=========================

[](#amphphttp-client-cookies)

AMPHP is a collection of event-driven libraries for PHP designed with fibers and concurrency in mind. This package provides automatic cookie handling as a plugin for [`amphp/http-client`](https://github.com/amphp/http-client).

Installation
------------

[](#installation)

This package can be installed as a [Composer](https://getcomposer.org/) dependency.

```
composer require amphp/http-client-cookies
```

Usage
-----

[](#usage)

`Amp\Http\Client\Cookie\CookieInterceptor` must be registered as a `NetworkInterceptor` to enable automatic cookie handling. It requires a `CookieJar` implementation, where you can choose between `LocalCookieJar`, `FileCookieJar`, and `NullCookieJar`.

```
