public function EasyRdf_Http_Client::resetParameters

Clear all GET and POST parameters

Should be used to reset the request parameters if the client is used for several concurrent requests.

clearAll parameter controls if we clean just parameters or also headers

Parameters

bool $clearAll Should all data be cleared?:

Return value

EasyRdf_Http_Client

1 call to EasyRdf_Http_Client::resetParameters()
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

File

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

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 resetParameters($clearAll = false) {

  // Reset parameter data
  $this->paramsGet = array();
  $this->rawPostData = null;
  $this->method = 'GET';
  if ($clearAll) {
    $this->headers = array();
  }
  else {

    // Clear outdated headers
    if (isset($this->headers['content-type'])) {
      unset($this->headers['content-type']);
    }
    if (isset($this->headers['content-length'])) {
      unset($this->headers['content-length']);
    }
  }
  return $this;
}