public function AcquiaLiftDrupalHttpClient::put in Acquia Lift Connector 7
Same name and namespace in other branches
- 7.2 includes/AcquiaLiftDrupalHttpClient.inc \AcquiaLiftDrupalHttpClient::put()
Implements AcquiaLiftDrupalHttpClientInterface::put().
Overrides AcquiaLiftDrupalHttpClientInterface::put
File
- includes/
acquia_lift.classes.inc, line 1814 - Provides an agent type for Acquia Lift
Class
- AcquiaLiftDrupalHttpClient
- This is just an OOP wrapper around drupal_http_request.
Code
public function put($uri = NULL, $headers = NULL, $body = NULL, array $options = array()) {
$data = $body === NULL ? NULL : $this
->encodeBody($body);
$headers = $headers ? $headers : array();
$options += array(
'timeout' => self::REQUEST_TIMEOUT_VALUE_DEFAULT,
);
$options = array(
'method' => 'PUT',
'data' => $data,
'headers' => $headers,
) + $options;
return drupal_http_request($uri, $options);
}