rstgroup/http-method-override 问题修复 & 功能扩展

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

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

rstgroup/http-method-override

Composer 安装命令:

composer require rstgroup/http-method-override

包简介

HTTP method override service

README 文档

README

HTTP method override service

This library allows you to override HTTP method using HTTP header ie. X-HTTP-Method-Override. Why? Because some clients cannot send non-standard methods like ie. LINK. It can be used as PSR-7 middeware or Zend Framework 2 module.

Installation

composer require rstgroup/http-method-override

Check suggested dependencies in composer.json and add it to your dependencies.

You need to configure how it's possible to override methods. To do that you need to create/modify configuration provided by service which must exists in your dependecy container (as config key):

return [
    'rst_group' => [
        'http_method_override' => [
            'map' => [
                'POST' => ['LINK', 'PUT'],
            ],
            'override_headers' => [],
        ],
    ],
];

It will add ability to use POST method as LINK or PUT. You can override it using given request:

POST http://example.com/page
X-HTTP-Method-Override: PUT

override_headers allow you to define own header to override.

Specific installation for PSR-7 middeware

Use Expressive Configuration Manager to add library config. After this you can enable middleware in your middleware-stack using RstGroup\HttpMethodOverride\HttpMethodOverrideMiddleware service name in your container.

Specific installation for Zend Framework 2 & 3

Add module RstGroup\HttpMethodOverride to application.config.php file.

统计信息

  • 总下载量: 8.19k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 8
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 5
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2016-02-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固