### Summary

It has been observed that using Ansible Vault encrypted strings are not properly handled by `ansible.netcommon.httpapi` resulting in `ansible.module_utils.connection.ConnectionError: HTTP Error 401: Unauthorized`.

### Issue Type

Bug Report

### Component Name

ansible.netcommon.httpapi

### Ansible Version

```console
$ ansible --version
ansible 2.10.12
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/ansible210/lib/python3.8/site-packages/ansible
  executable location = /opt/ansible210/bin/ansible
  python version = 3.8.10 (default, Jun 23 2021, 15:28:49) [GCC 8.3.0]
```


### Configuration

```console
$ ansible-config dump --only-changed

NO CONFIGURATION CHANGES!
```


### OS / Environment

Refer to VS Code Docker development environment in [https://gitlab.com/joelwking/401_errors](https://gitlab.com/joelwking/401_errors)

python:3.8.10-slim-buster
NXOS: version 9.3(3)

### Steps to Reproduce

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

Refer to README.md at https://gitlab.com/joelwking/401_errors/-/blob/main/README.md

To demonstrate, two test cases are configured in inventory files inventory_sbx_n9kv_httpapi.yml and inventory_sbx_n9kv_cli.yml.

Two hosts, `sandbox-nxos-1.cisco.com` and `131.226.217.151` are specified. They are the same host in the Cisco DevNet Sandbox. One host entry uses a clear-text password, the other host uses an Ansible Vault encrypted string. The first task in the playbook displays the values of username and password of the Nexus switch.

The playbook `configure_device_interfaces.yml` is executed twice, once using the HTTPAPI connection method, the second using Network CLI.

Note the HTTP Error 401 is observed when using HTTPAPI, but not when using Network CLI. In both cases the clear-text password is successfully authenticated.

### Expected Results

Authentication would be successful using the Ansible Vault encrypted string.

### Actual Results

```console
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible.module_utils.connection.ConnectionError: HTTP Error 401: Unauthorized
fatal: [131.226.217.151]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n  File \"/root/.ansible/tmp/ansible-local-69577f060trp9/ansible-tmp-1629126620.1739006-69911-227352806068616/AnsiballZ_nxos_config.py\", line 102, in <module>\n    _ansiballz_main()\n  File \"/root/.ansible/tmp/ansible-local-69577f060trp9/ansible-tmp-1629126620.1739006-69911-227352806068616/AnsiballZ_nxos_config.py\", line 94, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/root/.ansible/tmp/ansible-local-69577f060trp9/ansible-tmp-1629126620.1739006-69911-227352806068616/AnsiballZ_nxos_config.py\", line 40, in invoke_module\n    runpy.run_module(mod_name='ansible_collections.cisco.nxos.plugins.modules.nxos_config', init_globals=None, run_name='__main__', alter_sys=True)\n  File \"/usr/local/lib/python3.8/runpy.py\", line 207, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/local/lib/python3.8/runpy.py\", line 97, in _run_module_code\n    _run_code(code, mod_globals, init_globals,\n  File \"/usr/local/lib/python3.8/runpy.py\", line 87, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_cisco.nxos.nxos_config_payload_vwb25qjn/ansible_cisco.nxos.nxos_config_payload.zip/ansible_collections/cisco/nxos/plugins/modules/nxos_config.py\", line 606, in <module>\n  File \"/tmp/ansible_cisco.nxos.nxos_config_payload_vwb25qjn/ansible_cisco.nxos.nxos_config_payload.zip/ansible_collections/cisco/nxos/plugins/modules/nxos_config.py\", line 449, in main\n  File \"/tmp/ansible_cisco.nxos.nxos_config_payload_vwb25qjn/ansible_cisco.nxos.nxos_config_payload.zip/ansible_collections/cisco/nxos/plugins/module_utils/network/nxos/nxos.py\", line 129, in get_connection\n  File \"/tmp/ansible_cisco.nxos.nxos_config_payload_vwb25qjn/ansible_cisco.nxos.nxos_config_payload.zip/ansible/module_utils/connection.py\", line 195, in __rpc__\nansible.module_utils.connection.ConnectionError: HTTP Error 401: Unauthorized\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
"""Executes the json-rpc and returns the output received
           from remote device.
           :name: rpc method to be executed over connection plugin that implements jsonrpc 2.0
           :args: Ordered list of params passed as arguments to rpc method
           :kwargs: Dict of valid key, value pairs passed as arguments to rpc method
           For usage refer the respective connection plugin docs.
        """
        response = self._exec_jsonrpc(name, *args, **kwargs)
        if 'error' in response:
            err = response.get('error')
            msg = err.get('data') or err['message']
            code = err['code']
            raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code)
        return response['result']
    def send(self, data):
        try:
            sf = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
            sf.connect(self.socket_path)
            send_data(sf, to_bytes(data))
            response = recv_data(sf)
        except socket.error as e:
            sf.close()
            raise ConnectionError(
                'unable to connect to socket %s. See the socket path issue category in '
                'Network Debug and Troubleshooting Guide' % self.socket_path,
                err=to_text(e, errors='surrogate_then_replace'), exception=traceback.format_exc()
            )
        sf.close()
        return to_text(response, errors='surrogate_or_strict')