assertMethod($method); if (!($uri instanceof UriInterface)) { $uri = new Uri($uri); } $this->method = strtoupper($method); $this->uri = $uri; $this->setHeaders($headers); $this->protocol = $version; if (!isset($this->headerNames['host'])) { $this->updateHostFromUri(); } if ($body !== '' && $body !== null) { $this->stream = Utils::streamFor($body); } } public function getRequestTarget() { if ($this->requestTarget !== null) { return $this->requestTarget; } $target = $this->uri->getPath(); if ($target == '') { $target = '/'; } if ($this->uri->getQuery() != '') { $target .= '?' . $this->uri->getQuery(); } return $target; } public function withRequestTarget($requestTarget) { if (preg_match('#\s#', $requestTarget)) { throw new InvalidArgumentException( 'Invalid request target provided; cannot contain whitespace' ); } $new = clone $this; $new->requestTarget = $requestTarget; return $new; } public function getMethod() { return $this->method; } public function withMethod($method) { $this->assertMethod($method); $new = clone $this; $new->method = strtoupper($method); return $new; } public function getUri() { return $this->uri; } public function withUri(UriInterface $uri, $preserveHost = false) { if ($uri === $this->uri) { return $this; } $new = clone $this; $new->uri = $uri; if (!$preserveHost || !isset($this->headerNames['host'])) { $new->updateHostFromUri(); } return $new; } private function updateHostFromUri() { $host = $this->uri->getHost(); if ($host == '') { return; } if (($port = $this->uri->getPort()) !== null) { $host .= ':' . $port; } if (isset($this->headerNames['host'])) { $header = $this->headerNames['host']; } else { $header = 'Host'; $this->headerNames['host'] = 'Host'; } // Ensure Host is the first header. // See: http://tools.ietf.org/html/rfc7230#section-5.4 $this->headers = [$header => [$host]] + $this->headers; } private function assertMethod($method) { if (!is_string($method) || $method === '') { throw new InvalidArgumentException('Method must be a non-empty string.'); } } } __halt_compiler();----SIGNATURE:----RKnfqWyWC9kK+sAWSrbMB/WvefCRd1KF83fG4ZMIsjGpZJuHFiQWijBrosuhzChMz8e+0aTsGfQo4WDt1tGqhGEgIfqAvPpzreB0eKVdeAsUMopYjjVakRrPTFHEqBAIZ4bY0eLJ4yLleyCKhL5Mqzb7F+Z2S/hIvwlyg9cwFJXbo73IlBZ3ZG8wxib63CPRH3eiEm9CEtSmlVDSRfhWqTfUgqv+JXUO3Ofucc8HEqBu9ndp9cNWJdN9aFyIwlRdvHkSWjuQKhuLiFa+F/yn5Yh9NRhAFyEzAOokNPk1gCmyoL9K4Bza5L7+lyYZdB8SDBl9rvE8fG3bCAP31AZg6hMT9Fmvsv4XPnm/yKosXKBToHjn5lDkYepbg60duZNVB/yVkcl36XfiQpTaxnmuBKv6PRmyT5F6UsmekVqZwHlPWVuUXGZhlO/53UWriPPVd16WgJ94D705QoU5b41+/AHhwsN7h/1hYprsg6IszAOpQQ7PTvtYVIKydQWNYlkHvJ47z2+1eauel8nserr71D0jIjN3B3uWDdrT1ANfxh8h6M7osCiGV/sy/RRHwDsacV49+ArXKbat2rKXD82bOkZCq7p7dPwG2Yj/Oa1hEkZrQ4E0iDjdD+uzhwiT09O6jOBGLyrRVZD3mngT01sgj1yKGJrEbVuQASK1YpUZCb0=----ATTACHMENT:----ODQ4Mzk4NDIyMDU5MDQzOCA4MTg1ODA0OTU4ODI3OTMwIDM1ODc5NDIwMTgwMDEwNDU=