Added a function to customize the endpoint base url.