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;

    }
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;

    }
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 ; }
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
Perform a service request