original_string: public function doServiceRequest($service, $method, $format, $data)
      {
  
          $header = ToolConsumer::addSignature($service->endpoint, $this->getKey(), $this->secret, $data, $method, $format);
  
  // Connect to tool consumer
          $http = new HTTPMessage($service->endpoint, $method, $data, $header);
  // Parse JSON response
          if ($http->send() && !empty($http->response)) {
              $http->responseJson = json_decode($http->response);
              $http->ok = !is_null($http->responseJson);
          }
  
          return $http;
  
      }
code: public function doServiceRequest($service, $method, $format, $data)
      {
  
          $header = ToolConsumer::addSignature($service->endpoint, $this->getKey(), $this->secret, $data, $method, $format);
  
  // Connect to tool consumer
          $http = new HTTPMessage($service->endpoint, $method, $data, $header);
  // Parse JSON response
          if ($http->send() && !empty($http->response)) {
              $http->responseJson = json_decode($http->response);
              $http->ok = !is_null($http->responseJson);
          }
  
          return $http;
  
      }
code_tokens: public function doServiceRequest ( $ service , $ method , $ format , $ data ) { $ header = ToolConsumer :: addSignature ( $ service -> endpoint , $ this -> getKey ( ) , $ this -> secret , $ data , $ method , $ format ) ; // Connect to tool consumer $ http = new HTTPMessage ( $ service -> endpoint , $ method , $ data , $ header ) ; // Parse JSON response if ( $ http -> send ( ) && ! empty ( $ http -> response ) ) { $ http -> responseJson = json_decode ( $ http -> response ) ; $ http -> ok = ! is_null ( $ http -> responseJson ) ; } return $ http ; }
docstring: Perform a service request
  
  @param object $service  Service object to be executed
  @param string $method   HTTP action
  @param string $format   Media type
  @param mixed  $data     Array of parameters or body string
  
  @return HTTPMessage HTTP object containing request and response details
docstring_tokens: Perform a service request