Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Request.php

function Request::isMethodSafe

Checks whether or not the method is safe.

See also

https://tools.ietf.org/html/rfc7231#section-4.2.1

File

vendor/symfony/http-foundation/Request.php, line 1352

Class

Request
Request represents an HTTP request.

Namespace

Symfony\Component\HttpFoundation

Code

public function isMethodSafe() : bool {
    return \in_array($this->getMethod(), [
        'GET',
        'HEAD',
        'OPTIONS',
        'TRACE',
    ]);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal