Use host or hostname even when port is not passed to request

Use host or hostname even when port is not passed to request for http and https requests
Updated test command on README file