定制 webclient/ext-cookie 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

webclient/ext-cookie

最新稳定版本:v2.0.1

Composer 安装命令:

composer require webclient/ext-cookie

包简介

Cookies extension for PSR-18 HTTP client

README 文档

README

Latest Stable Version Total Downloads License PHP

webclient/ext-cookie

Cookie extension for PSR-18 HTTP client.

Install

Install this package and your favorite psr-18 implementation.

composer require webclient/ext-cookie:^2.0

Using

<?php

use Psr\Http\Client\ClientInterface;
use Psr\Http\Message\RequestInterface;
use Webclient\Extension\Cookie\CookieClientDecorator;
use Webclient\Extension\Cookie\Cookie\Storage;

/** 
 * @var ClientInterface $client Your PSR-18 HTTP Client
 * @var Storage $storage Cookies storage. You may extends this class for implements your storage
 */
$http = new CookieClientDecorator($client, $storage);

/** @var RequestInterface $request */
$response = $http->sendRequest($request);

Provided cookies stores

  • \Webclient\Extension\Cookie\Cookie\ArrayStorage - Cookies stored in memory.
  • \Webclient\Extension\Cookie\Cookie\NetscapeCookieFile - Cookies stored in a file (format).

统计信息

  • 总下载量: 61
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 1

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-06-30