code: public function replaceHeaders(array $headers)
      {
          foreach ($headers as $key => $value) {
              $this->setHeader($key, $value);
          }
          return $this;
      }
docs: Replace Headers Value
  
  @param array $headers collection headers array
  @return static