Added optional custom basePath, plust GetBasePath for http pool.