Allow caller to specify a hostname/port separately

Originally from https://github.com/bcochran-shutterstock/armrest

Reviewed by yanismydj (ylhert)