2017-25 © Pedro Peláez
 

library http-method-override

HTTP method override service

image

rstgroup/http-method-override

HTTP method override service

  • Thursday, February 8, 2018
  • by alabme
  • Repository
  • 6 Watchers
  • 2 Stars
  • 149 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 12 Versions
  • 26 % Grown

The README.md

http-method-override Build Status

HTTP method override service, (*1)

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., (*2)

Installation

composer require rstgroup/http-method-override

Check suggested dependencies in composer.json and add it to your dependencies., (*3)

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):, (*4)

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:, (*5)

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

override_headers allow you to define own header to override., (*6)

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., (*7)

Specific installation for Zend Framework 2 & 3

Add module RstGroup\HttpMethodOverride to application.config.php file., (*8)

The Versions

24/05 2017

dev-improve_testing

dev-improve_testing

HTTP method override service

  Sources   Download

The Requires

 

The Development Requires

middleware psr psr-7 http module http method overrive

02/02 2016
02/02 2016

dev-implementation

dev-implementation

HTTP method override service

  Sources   Download

The Requires

  • php ^5.5 || ^7.0

 

The Development Requires

middleware psr psr-7 http module http method overrive