function RequestHandler::handleRaw

Same name in other branches
  1. 9 core/modules/rest/src/RequestHandler.php \Drupal\rest\RequestHandler::handleRaw()
  2. 8.9.x core/modules/rest/src/RequestHandler.php \Drupal\rest\RequestHandler::handleRaw()
  3. 11.x core/modules/rest/src/RequestHandler.php \Drupal\rest\RequestHandler::handleRaw()

Handles a REST API request without deserializing the request body.

Parameters

\Drupal\Core\Routing\RouteMatchInterface $route_match: The route match.

\Symfony\Component\HttpFoundation\Request $request: The HTTP request object.

\Drupal\rest\RestResourceConfigInterface $_rest_resource_config: The REST resource config entity.

Return value

\Symfony\Component\HttpFoundation\Response|\Drupal\rest\ResourceResponseInterface The REST resource response.

File

core/modules/rest/src/RequestHandler.php, line 85

Class

RequestHandler
Acts as intermediate request forwarder for resource plugins.

Namespace

Drupal\rest

Code

public function handleRaw(RouteMatchInterface $route_match, Request $request, RestResourceConfigInterface $_rest_resource_config) {
    $resource = $_rest_resource_config->getResourcePlugin();
    $response = $this->delegateToRestResourcePlugin($route_match, $request, NULL, $resource);
    return $this->prepareResponse($response, $_rest_resource_config);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.