public function EasyRdf_Http_Client::setUri

Set the URI for the next request

Parameters

string $uri:

Return value

EasyRdf_Http_Client

2 calls to EasyRdf_Http_Client::setUri()
EasyRdf_Http_Client::request in drupal/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Http/Client.php
Send the HTTP request and return an HTTP response object
EasyRdf_Http_Client::__construct in drupal/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Http/Client.php
Constructor method. Will create a new HTTP client. Accepts the target URL and optionally configuration array.

File

drupal/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Http/Client.php, line 128

Class

EasyRdf_Http_Client
This class is an implemetation of an HTTP client in PHP. It supports basic HTTP 1.0 and 1.1 requests. For a more complete implementation try Zend_Http_Client.

Code

public function setUri($uri) {
  if (!is_string($uri)) {
    $uri = strval($uri);
  }
  if (!preg_match('/^http(s?):/', $uri)) {
    throw new InvalidArgumentException("EasyRdf_Http_Client only supports the 'http' and 'https' schemes.");
  }
  $this->uri = $uri;
  return $this;
}