amphp/http-client-guzzle-adapter 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

amphp/http-client-guzzle-adapter

最新稳定版本:v1.1.3

Composer 安装命令:

composer require amphp/http-client-guzzle-adapter

包简介

Guzzle adapter for Amp's HTTP client.

README 文档

README

AMPHP is a collection of event-driven libraries for PHP designed with fibers and concurrency in mind. This package provides an adapter for Guzzle 7 to allow using amphp/http-client as the underlying HTTP transport, providing interoperability between libraries requiring Guzzle and libraries or applications built with AMPHP.

Latest Release MIT License

Installation

This package can be installed as a Composer dependency.

composer require amphp/http-client-guzzle-adapter

Requirements

  • PHP 8.1+

Usage

Set the Guzzle handler as shown below to use AMPHP's HTTP Client as the request handler for Guzzle HTTP requests. This allows libraries relying on a Guzzle HTTP client to be used within an async application built upon AMPHP.

<?php

use Amp\Http\Client\GuzzleAdapter\GuzzleHandlerAdapter;
use GuzzleHttp\Client;
use GuzzleHttp\HandlerStack;

$client = new Client([
    'handler' => HandlerStack::create(new GuzzleHandlerAdapter()),
]);

Examples

More extensive code examples reside in the examples directory.

Versioning

amphp/http-client-guzzle-adapter follows the semver semantic versioning specification like all other amphp packages.

Security

If you discover any security related issues, please use the private security issue reporter instead of using the public issue tracker.

License

The MIT License (MIT). Please see LICENSE for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-09-01