public function RequestHandler::handleRaw in Drupal 9
Same name and namespace in other branches
- 8 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\restCode
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);
}