public static function Request::enableHttpMethodParameterOverride

Enables support for the _method request parameter to determine the intended HTTP method.

Be warned that enabling this feature might lead to CSRF issues in your code. Check that you are using CSRF tokens when required.

The HTTP method can only be overridden when the real HTTP method is POST.

2 calls to Request::enableHttpMethodParameterOverride()
RequestTest::testCreateFromGlobals in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/RequestTest.php
@dataProvider provideOverloadedMethods
RequestTest::testGetSetMethod in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/RequestTest.php
@covers Symfony\Component\HttpFoundation\Request::setMethod @covers Symfony\Component\HttpFoundation\Request::getMethod

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php, line 584

Class

Request
Request represents an HTTP request.

Namespace

Symfony\Component\HttpFoundation

Code

public static function enableHttpMethodParameterOverride() {
  self::$httpMethodParameterOverride = true;
}