add: A function for better customization.
fix: If the host url is like 'https://host.com' (besides, the 'https://host.com/' will work) , the function won't work properly with ssl.
Merge branch 'fix_ssl_bug'