Nette\Http\IResponse::addHeader PHP 메소드

addHeader() 공개 메소드

Adds HTTP header.
public addHeader ( $name, $value ) : void
리턴 void
    function addHeader($name, $value);

Usage Example

예제 #1
0
 public function __invoke($application, $response)
 {
     if ($response instanceof JsonResponse && ($payload = $response->getPayload()) instanceof \stdClass) {
         if ($this->forwardHasHappened && !isset($payload->redirect)) {
             $payload->url = $application->getPresenter()->link('this');
         }
         $this->httpResponse->addHeader('Vary', 'X-Requested-With');
     }
 }
All Usage Examples Of Nette\Http\IResponse::addHeader