You are here

public function HttpClientRequest::__construct in Http Client 7.2

Same name and namespace in other branches
  1. 6.2 includes/HttpClient.inc \HttpClientRequest::__construct()

Construct a new client request.

Parameters

$url: The url to send the request to.

$values: An array of values for the object properties to set for the request.

File

includes/HttpClient.inc, line 558

Class

HttpClientRequest
This is a convenience class that allows the manipulation of a http request before it's handed over to curl.

Code

public function __construct($url, $values = array()) {
  $this->url = $url;
  foreach (get_object_vars($this) as $key => $value) {
    if (isset($values[$key])) {
      $this->{$key} = $values[$key];
    }
  }
}