5use InvalidArgumentException;
 
   45            throw new InvalidArgumentException(
'The first argument for this constructor should be a string or null, not an array. Did you upgrade from sabre/http 1.0 to 2.0?');
 
  113            parse_str(substr(
$url, 
$index + 1), $queryParams);
 
  127        $this->absoluteUrl = 
$url;
 
  138        return $this->absoluteUrl;
 
  159        $this->baseUrl = 
$url;
 
  194        $uri = str_replace(
'//', 
'/', $this->
getUrl());
 
  202            list($uri) = explode(
'?', $uri);
 
  214        throw new \LogicException(
'Requested uri (' . $this->
getUrl() . 
') is out of base uri (' . $this->
getBaseUrl() . 
')');
 
  271        if (isset($this->rawServerData[$valueName])) {
 
  272            return $this->rawServerData[$valueName];
 
  285        $this->rawServerData = 
$data;
 
  298        $out = $this->
getMethod() . 
' ' . $this->
getUrl() . 
' HTTP/' . $this->getHTTPVersion() . 
"\r\n";
 
  301            foreach ($value as $v) {
 
  302                if (
$key === 
'Authorization') {
 
  303                    list($v) = explode(
' ', $v, 2);
 
An exception for terminatinating execution or to throw for unit testing.
This is the abstract base class for both the Request and Response objects.
getBodyAsString()
Returns the body as a string.
getHeaders()
Returns all the HTTP headers as an array.
setHeaders(array $headers)
Sets a new set of HTTP headers.
setBody($body)
Replaces the body resource with a new stream or string.
The Request class represents a single HTTP request.
getAbsoluteUrl()
Returns the absolute url.
getUrl()
Returns the request url.
setMethod($method)
Sets the HTTP method.
getQueryParameters()
Returns the list of query parameters.
setAbsoluteUrl($url)
Sets the absolute url.
getBaseUrl()
Returns the current base url.
setRawServerData(array $data)
Sets the _SERVER array.
getPath()
Returns the relative path.
getMethod()
Returns the current HTTP method.
setUrl($url)
Sets the request url.
getRawServerValue($valueName)
Returns an item from the _SERVER array.
setPostData(array $postData)
Sets the post data.
__construct($method=null, $url=null, array $headers=null, $body=null)
Creates the request object.
getPostData()
Returns the POST data.
__toString()
Serializes the request object as a string.
setBaseUrl($url)
Sets a base url.
static decodePath($path)
Decodes a url-encoded path.
The RequestInterface represents a HTTP request.
normalize($uri)
Takes a URI or partial URI as its argument, and normalizes it.