softonic/laravel-request-accept-json-middleware
最新稳定版本:4.0.0
Composer 安装命令:
composer require softonic/laravel-request-accept-json-middleware
包简介
Laravel middleware to add Accept application/json header to requests
README 文档
README
This middleware adds the ability to automatically add the Accept application/json header to every request if it was not provided.
Installation
Via composer:
composer require softonic/laravel-request-accept-json-middleware
Documentation
To use the middleware register it in app/Http/Kernel.php
protected $middleware
= [
...
RequestAcceptJson::class,
...
];
From now on the header Accept: application/json will be automatically added to every request.
Testing
softonic/laravel-request-accept-json-middleware has a PHPUnit test suite and a coding style compliance test suite using PHP CS Fixer.
To run the tests, run the following command from the project folder.
$ docker-compose run test
License
The Apache 2.0 license. Please see LICENSE for more information.
统计信息
- 总下载量: 48.7k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2019-07-29