original_string: public function makeRequest($method, $endpoint, $body = [], $asArray = true)
      {
          try {
              list($rawBody, $httpStatusCode, $httpHeader) = $this->getHttpClient()->request(
                  $method,
                  $this->makeAbsUrl($endpoint),
                  ['api_key' => $this->apiKey],
                  $body
              );
  
              $array = json_decode($rawBody, true);
          } catch (\Exception $e) {
              throw new ApiError($e->getMessage(), $body);
          }
  
          if ($asArray) {
              return $array;
          }
          return [$rawBody, $httpStatusCode, $httpHeader];
      }
code: public function makeRequest($method, $endpoint, $body = [], $asArray = true)
      {
          try {
              list($rawBody, $httpStatusCode, $httpHeader) = $this->getHttpClient()->request(
                  $method,
                  $this->makeAbsUrl($endpoint),
                  ['api_key' => $this->apiKey],
                  $body
              );
  
              $array = json_decode($rawBody, true);
          } catch (\Exception $e) {
              throw new ApiError($e->getMessage(), $body);
          }
  
          if ($asArray) {
              return $array;
          }
          return [$rawBody, $httpStatusCode, $httpHeader];
      }
code_tokens: public function makeRequest ( $ method , $ endpoint , $ body = [ ] , $ asArray = true ) { try { list ( $ rawBody , $ httpStatusCode , $ httpHeader ) = $ this -> getHttpClient ( ) -> request ( $ method , $ this -> makeAbsUrl ( $ endpoint ) , [ 'api_key' => $ this -> apiKey ] , $ body ) ; $ array = json_decode ( $ rawBody , true ) ; } catch ( \ Exception $ e ) { throw new ApiError ( $ e -> getMessage ( ) , $ body ) ; } if ( $ asArray ) { return $ array ; } return [ $ rawBody , $ httpStatusCode , $ httpHeader ] ; }
docstring: Make the API call and return the response.
  
  @param string $method    Method to use for given endpoint
  @param string $endpoint  Endpoint to hit on API
  @param array $body       Body content of the request as array
  @param bool $asArray     To know if we return an array or ResponseInterface
  @return array|ResponseInterface
  @throws ApiError
docstring_tokens: Make the API call and return the response .