Beispiel #1
0
 /**
  * Parse a URI string
  *
  * @param  string $uri
  * @return Http
  */
 public function parse($uri)
 {
     parent::parse($uri);
     if (empty($this->path)) {
         $this->path = '/';
     }
     return $this;
 }
Beispiel #2
0
 public function __construct($uri, string $method = Http::GET, array $headers = [], string $protocolVersion = '1.1')
 {
     parent::__construct($headers, $protocolVersion);
     $this->method = $this->filterMethod($method);
     $this->uri = Uri::parse($uri);
 }