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:----okOxlk1dA5NKTbaIMX3PZZKCCstm/MfQ8C3R2dPG5rrF+7NR7PSUiSGTWe+AKRjrP7naxdhpQVkf1rhGCWu3MktYZusUa0YF+F4Knm/dIQpMdsbAAFsdOiUAlod9te1UvD1XikdArtwqtv6E0aWTo4gLBd+s2GGpZxaHBxix8GbW1JMlFCo1s/V5Vj2rsQh9qq5IROym11CBwVzVIDSbzKKbjf3rkzjNcbz9pcbYkM7rR6p2+p+VVjY48mraTVtyh6oegAjOw8tZx3jf/vQ3K6Tn+LPeH9GlmQ5Y9bZ8J4MDO9UOtvB8Elno2apB2wMzpx/xorNDhCGtYAuKn8gzOPF7KyRl+qowRc/X3sN3u2Uf7nUbCWF9FdoEV8Js0DyXBrmWIx2tKSE6zeWXHd8zf+AOtl5MdtkrkjCDt6arOf8W7T/o4FoHv9OT6B56cGq8bZFwYGbg82T51uSl93q4iMtQ/LDzeusG+eObTY/6c0BmXgnfpF65rcUktRbNqNwV/Be64X9VqSrCGmBlNk9Si/QXdyhPOPBf0MAkAVszGZVOeY5yKMf2aWzbxB7cpkmCRkP/avlCd0xAJBf68oyadIhyzFM7eGuJzosifdLWgme113Ns3nkR2cuwekOhi5tH0erlZt+Ae5YlK1c1N1ALyOIRg2vYGGl+GRY3LJKyk58=----ATTACHMENT:----NTEyMjk0OTcxNTI3ODQzOSAyNjkxNDc0MzM3NTg0NTUgNDI0ODc3MjIxNDE4NDE0MA==