You are here

public function Resource::doPost in RESTful 7.2

Shorthand method to perform a quick POST request.

Parameters

array $parsed_body: The parsed body.

Return value

array The array ready for the formatter.

Overrides ResourceInterface::doPost

File

src/Plugin/resource/Resource.php, line 259
Contains \Drupal\restful\Plugin\resource\Resource.

Class

Resource

Namespace

Drupal\restful\Plugin\resource

Code

public function doPost(array $parsed_body) {
  return $this
    ->doWrite(RequestInterface::METHOD_POST, '', $parsed_body);
}