You are here

public function NoSerializationClassTestResource::post in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/rest/tests/modules/rest_test/src/Plugin/rest/resource/NoSerializationClassTestResource.php \Drupal\rest_test\Plugin\rest\resource\NoSerializationClassTestResource::post()

Responds to a POST request.

Parameters

array $data: An array with the payload.

Return value

\Drupal\rest\ResourceResponse

File

core/modules/rest/tests/modules/rest_test/src/Plugin/rest/resource/NoSerializationClassTestResource.php, line 28

Class

NoSerializationClassTestResource
Class used to test that serialization_class is optional.

Namespace

Drupal\rest_test\Plugin\rest\resource

Code

public function post(array $data) {
  return new ResourceResponse($data);
}