You are here

protected function AcquiaLiftDrupalHttpClient::encodeBody in Acquia Lift Connector 7

Same name and namespace in other branches
  1. 7.2 includes/AcquiaLiftDrupalHttpClient.inc \AcquiaLiftDrupalHttpClient::encodeBody()
3 calls to AcquiaLiftDrupalHttpClient::encodeBody()
AcquiaLiftDrupalHttpClient::delete in includes/acquia_lift.classes.inc
Implements AcquiaLiftDrupalHttpClientInterface::delete().
AcquiaLiftDrupalHttpClient::post in includes/acquia_lift.classes.inc
Implements AcquiaLiftDrupalHttpClientInterface::post().
AcquiaLiftDrupalHttpClient::put in includes/acquia_lift.classes.inc
Implements AcquiaLiftDrupalHttpClientInterface::put().

File

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

Class

AcquiaLiftDrupalHttpClient
This is just an OOP wrapper around drupal_http_request.

Code

protected function encodeBody($body) {
  if (is_string($body)) {
    $data = $body;
  }
  else {
    $data = drupal_json_encode($body);
  }
  return $data;
}