5 use Symfony\Component\HttpFoundation\Response;
8 * A response that does not contain cacheability metadata.
10 * Used when resources are modified by a request: responses to unsafe requests
11 * (POST/PATCH/DELETE) can never be cached.
13 * @see \Drupal\rest\ResourceResponse
15 class ModifiedResourceResponse extends Response implements ResourceResponseInterface {
17 use ResourceResponseTrait;
20 * Constructor for ModifiedResourceResponse objects.
23 * Response data that should be serialized.
25 * The response status code.
26 * @param array $headers
27 * An array of response headers.
29 public function __construct($data = NULL, $status = 200, $headers = []) {
30 $this->responseData = $data;
31 parent::__construct('', $status, $headers);