You are here

public function AcquiaLiftDrupalHttpClient::delete in Acquia Lift Connector 7

Same name and namespace in other branches
  1. 7.2 includes/AcquiaLiftDrupalHttpClient.inc \AcquiaLiftDrupalHttpClient::delete()

Implements AcquiaLiftDrupalHttpClientInterface::delete().

Overrides AcquiaLiftDrupalHttpClientInterface::delete

File

includes/acquia_lift.classes.inc, line 1840
Provides an agent type for Acquia Lift

Class

AcquiaLiftDrupalHttpClient
This is just an OOP wrapper around drupal_http_request.

Code

public function delete($uri = null, $headers = null, $body = null, array $options = array()) {
  $data = $body ? $this
    ->encodeBody($body) : NULL;
  $headers = $headers ? $headers : array();
  $options += array(
    'timeout' => self::REQUEST_TIMEOUT_VALUE_DEFAULT,
  );
  $options = array(
    'method' => 'DELETE',
    'data' => $data,
    'headers' => $headers,
  ) + $options;
  return drupal_http_request($uri, $options);
}