public function send(string $method, string $endpoint, array $parameters = null)
    {
        /** @var string|array $parameters */
        $data = $this->processor->prepare($method, $parameters);

        switch ($method) {
            case 'get':
                return $this->adapter->get(
                    $this->getEndpoint() . '/' . trim($endpoint, '/') . trim($data, '/')
                );
            case 'post':
                return $this->adapter->post(
                    $this->getEndpoint() . '/' . trim($endpoint, '/'),
                    $data ?? []
                );
        }
    }
public function send(string $method, string $endpoint, array $parameters = null)
    {
        /** @var string|array $parameters */
        $data = $this->processor->prepare($method, $parameters);

        switch ($method) {
            case 'get':
                return $this->adapter->get(
                    $this->getEndpoint() . '/' . trim($endpoint, '/') . trim($data, '/')
                );
            case 'post':
                return $this->adapter->post(
                    $this->getEndpoint() . '/' . trim($endpoint, '/'),
                    $data ?? []
                );
        }
    }
public function send ( string $ method , string $ endpoint , array $ parameters = null ) { /** @var string|array $parameters */ $ data = $ this -> processor -> prepare ( $ method , $ parameters ) ; switch ( $ method ) { case 'get' : return $ this -> adapter -> get ( $ this -> getEndpoint ( ) . '/' . trim ( $ endpoint , '/' ) . trim ( $ data , '/' ) ) ; case 'post' : return $ this -> adapter -> post ( $ this -> getEndpoint ( ) . '/' . trim ( $ endpoint , '/' ) , $ data ?? [ ] ) ; } }
Processes the data to send, and passes it to the adapter

@param string $method
@param string $endpoint
@param array|null $parameters
@return array
Processes the data to send and passes it to the adapter