public function NoSerializationClassTestResource::post in Drupal 10
Same name and namespace in other branches
- 8 core/modules/rest/tests/modules/rest_test/src/Plugin/rest/resource/NoSerializationClassTestResource.php \Drupal\rest_test\Plugin\rest\resource\NoSerializationClassTestResource::post()
- 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
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\resourceCode
public function post(array $data) {
return new ResourceResponse($data);
}