re-working `use_internal_url` in declaration, adding test case for endpoint variable