honors ssl and protocol settings; sets rets-version header and user agent