Changed using_https in apiv2 code to is_secure()