add support for custom subdomain in requests

also refactored a little bit of the way the default settings are
handled. set some constants for DEFAULT_SUBDOMAIN, DEFAULT_URL_BASE and
DEFAULT_PROTOCOL to enable the ability to switch back more easily in the
event that one needs to change things.