addHeader() public method

Existing values for the specified header will be maintained. The new value will be appended to the existing list.
public addHeader ( string $header, string $value ) : void
$header string header name to add
$value string value of the header
return void
Example #1
0
 /**
  * @covers \Bluz\Response\Response::removeHeaders
  */
 public function testRemoveHeaders()
 {
     $this->response->addHeader('foo', 'bar');
     $this->response->addHeader('baz', 'qux');
     $this->response->removeHeaders();
     $this->assertFalse($this->response->hasHeader('foo'));
     $this->assertFalse($this->response->hasHeader('baz'));
 }