/** * Parse a URI string * * @param string $uri * @return Http */ public function parse($uri) { parent::parse($uri); if (empty($this->path)) { $this->path = '/'; } return $this; }
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); }