
##### SUMMARY
<!--- Explain the problem briefly below -->

For a collection install command like `ansible-galaxy collection install -s automation_hub_ci google.cloud`, ansible-galaxy ends up making requests to API endpoints that should end with a trailing slash but ansible-galaxy drops the trailing slash.

On the server side, galaxy issues a 302 redirect to the location with the URL with the trailing slash appended. And ansible-galaxy follows it correctly.

For example, 

ansible-galaxy makes the request:

`https://ci.cloud.redhat.com/api/automation-hub/v3/collections/cloud/google/versions`

which returns a 302 redirect response pointing to:

`https://ci.cloud.redhat.com/api/automation-hub/v3/collections/cloud/google/versions/'

But the redirect is superfluous and slows things down a bit. Depending on conditions, each redirect may take between 100ms and 500ms. 

But that's 100-500ms additional per collection being installed.

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
ansible-galaxy

##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible 2.10.0.dev0
  config file = /home/adrian/src/ansible/ansible.cfg
  configured module search path = ['/home/adrian/ansible/my-modules']
  ansible python module location = /home/adrian/src/ansible/lib/ansible
  executable location = /home/adrian/src/ansible/bin/ansible
  python version = 3.6.9 (default, Jul  3 2019, 17:57:57) [GCC 8.3.1 20190223 (Red Hat 8.3.1-2)]

```

##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->

ansible-ah-example.cfg:

```paste below
[defaults]
log_path = $HOME/.ansible/log/ansible.log

[galaxy]
server_list = automation_hub_ci, galaxy

[galaxy_server.automation_hub_ci]
url=https://ci.cloud.redhat.com/api/automation-hub/
# auth_url=https://sso.qa.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token
# Fill in your auth info here
# username=
# password=
# token=

[galaxy_server.galaxy]
url=https://galaxy.ansible.com/api/

```

##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
fedora 30-ish, x86_64

##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->

<!--- Paste example playbooks or commands between quotes below -->
```yaml

```

`ANSIBLE_CONFIG=ansible-ah-example.cfg ansible-galaxy collection install -s automation_hub_ci google.cloud`

You may need to use a web debugging tool like mitmproxy to see the additional
requests. AFAIK, that info isn't shown any any ansible log/verbose/debug level.

##### EXPECTED RESULTS
One request per galaxy resources needed

##### ACTUAL RESULTS
A request to the wrong url (no trailing slash), that is then followed to correct location

<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->

<!--- Paste verbatim command output between quotes -->
```paste below

```

[
        {
            'count': 2,
            'results': [{'name': '3.5.1', }, {'name': '3.5.2'}],
            'next_link': None,
            'next': None,
            'previous_link': None,
            'previous': None
        },
    ],
    [
        {
            'count': 2,
            'results': [{'name': '3.5.1'}],
            'next_link': '/api/v1/roles/432/versions/?page=2&page_size=50',
            'next': '/roles/432/versions/?page=2&page_size=50',
            'previous_link': None,
            'previous': None
        },
        {
            'count': 2,
            'results': [{'name': '3.5.2'}],
            'next_link': None,
            'next': None,
            'previous_link': '/api/v1/roles/432/versions/?&page_size=50',
            'previous': '/roles/432/versions/?page_size=50',
        },
    ]
])
def test_get_role_versions_pagination(monkeypatch, responses):