You are here

public function MessageTrait::withoutHeader in Lockr 7.3

File

vendor/guzzlehttp/psr7/src/MessageTrait.php, line 107

Class

MessageTrait
Trait implementing functionality common to requests and responses.

Namespace

GuzzleHttp\Psr7

Code

public function withoutHeader($header) {
  $normalized = strtolower($header);
  if (!isset($this->headerNames[$normalized])) {
    return $this;
  }
  $header = $this->headerNames[$normalized];
  $new = clone $this;
  unset($new->headers[$header], $new->headerNames[$normalized]);
  return $new;
}