public function withHeaders(array $array, int $code = null)
  {
    foreach($array as $field => $i) {
      array_push($this->headers, $field .': '. $i);
    }

    if ($code != null) {
      $this->code = $code;
      header('HTTP/1.1 '.$this->code);
      return $this->send();
    }

    return $this;
  }
public function withHeaders(array $array, int $code = null)
  {
    foreach($array as $field => $i) {
      array_push($this->headers, $field .': '. $i);
    }

    if ($code != null) {
      $this->code = $code;
      header('HTTP/1.1 '.$this->code);
      return $this->send();
    }

    return $this;
  }
public function withHeaders ( array $ array , int $ code = null ) { foreach ( $ array as $ field => $ i ) { array_push ( $ this -> headers , $ field . ': ' . $ i ) ; } if ( $ code != null ) { $ this -> code = $ code ; header ( 'HTTP/1.1 ' . $ this -> code ) ; return $ this -> send ( ) ; } return $ this ; }
Set response header's

@param  array  $array
@return Rest
Set response header s