public function getEndpointUrl($path, $withTrailingSlash)
    {
        $url = $this->endpoint . '/' . $path;
        
        if ($withTrailingSlash) {
            $url = $url . '/';
        }
        
        return $url;
    }