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

Breadcrumb

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

function ResourceBase::requestMethods

Provides predefined HTTP request methods.

Plugins can override this method to provide additional custom request methods.

Return value

array The list of allowed HTTP request method strings.

1 call to ResourceBase::requestMethods()
ResourceBase::availableMethods in core/modules/rest/src/Plugin/ResourceBase.php
Returns the available HTTP request methods on this plugin.

File

core/modules/rest/src/Plugin/ResourceBase.php, line 131

Class

ResourceBase
Common base class for resource plugins.

Namespace

Drupal\rest\Plugin

Code

protected function requestMethods() {
    return [
        'HEAD',
        'GET',
        'POST',
        'PUT',
        'DELETE',
        'TRACE',
        'OPTIONS',
        'CONNECT',
        'PATCH',
    ];
}

API Navigation

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