wizbit / guzzle-bundle-middleware-plugin
这是一个通用的中间件插件,用于Guzzle Bundle,它是一个PHP HTTP客户端库和框架,用于构建RESTful Web服务客户端
2.0.0
2020-05-08 16:47 UTC
Requires
- php: >=7.1
- eightpoints/guzzle-bundle: ~8.0
- symfony/config: ~4.0|~5.0
- symfony/dependency-injection: ~4.0|~5.0
- symfony/expression-language: ~4.0|~5.0
- symfony/http-kernel: ~4.0|~5.0
This package is auto-updated.
Last update: 2024-09-12 22:09:37 UTC
README
此插件以通用方式集成所有中间件。
要求
- PHP 7.0 或更高版本
- Guzzle Bundle
安装
使用 composer
命令行
$ composer require wizbit/guzzle-bundle-middleware-plugin
用法
启用包
# app/AppKernel.php new EightPoints\Bundle\GuzzleBundle\EightPointsGuzzleBundle([ new Wizbit\Bundle\GuzzleBundleMiddlewarePlugin\GuzzleBundleMiddlewarePlugin(), ])
基本配置
# app/config/config.yml eight_points_guzzle: clients: api_payment: base_url: "http://api.domain.tld" # define headers, options # plugin settings plugin: middleware: - '@my.middleware.service'