You are here

public static function Request::isReadMethod in RESTful 7.2

Determines if the HTTP method represents a read operation.

Parameters

string $method: The method name.

Return value

boolean TRUE if it is a read operation. FALSE otherwise.

Overrides RequestInterface::isReadMethod

2 calls to Request::isReadMethod()
Request::isValidMethod in src/Http/Request.php
Determines if the HTTP method is one of the known methods.
RestfulCsrfTokenTestCase::checkCsrfRequest in tests/RestfulCsrfTokenTestCase.test
Perform requests without, with invalid and with valid CSRF tokens.

File

src/Http/Request.php, line 206
Contains \Drupal\restful\Http\Request

Class

Request
Deals with everything coming from the consumer.

Namespace

Drupal\restful\Http

Code

public static function isReadMethod($method) {
  $method = strtoupper($method);
  return in_array($method, array(
    static::METHOD_GET,
    static::METHOD_HEAD,
    static::METHOD_OPTIONS,
    static::METHOD_TRACE,
    static::METHOD_CONNECT,
  ));
}