lanser/http-facade-middleware
Composer 安装命令:
composer require lanser/http-facade-middleware
包简介
middleware for Laravel http facade Request and Response options and parameters
README 文档
README
INSTALL
composer require lanser/http-facade-middleware:dev-main
With GuzzleHttp Client
$stack = HandlerStack::create(new CurlHandler());
$stack->push(new ExampleGuzzleMiddleware());
$client = new Client([ 'base_uri' => 'https://dummyjson.com', 'handler' => $stack, ]);
$res = $client->get("/products/1");
With Laravel Http Facade
Http::baseUrl('https://dummyjson.com')
->withHeaders([
'Accept' => 'application/json',
'Content-Type' => 'application/json',
])
->withMiddleware(new ExampleGuzzleMiddleware())
->get("/products/1")->json();
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-02-19