public function Response::setVary

Sets the Vary header.

@api

Parameters

string|array $headers:

Boolean $replace Whether to replace the actual value of not (true by default):

Return value

Response

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Response.php, line 999

Class

Response
Response represents an HTTP response.

Namespace

Symfony\Component\HttpFoundation

Code

public function setVary($headers, $replace = true) {
  $this->headers
    ->set('Vary', $headers, $replace);
  return $this;
}