`resuests.post` working in JupyterLab but failing in python script

# Summary.

Facing an unusual behavior. `requests.post` working in JupyterLab notebook for the below code snippet. But same is failing if running in script. Saw similar python `requests` issue in github, but people mistakenly posted it in Javascript `request` package github issue page [here](https://github.com/request/request/issues/3147)


## Expected Result

In JupyterLab getting response from the API endpoint and receiving the below response.

```py
{'input_id': 'b36e1cb8-a3e6-11eb-ae01-00505688397d',
 'prediction': 12389.1817}
```

The above response is the actual behavior. Next copied the code and ran in a script but failing. 

- Both JulyterLab and script running under same conda environement.

## Actual Result

What happened instead.

```py
urllib3.exceptions.ProtocolError: ("Connection broken: TimeoutError(110, 'Connection timed out')", TimeoutError(110, 'Connection timed out'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "webapp/debug_request.py", line 37, in <module>
    response = rq.post(
  File "/home/s1bfwd/miniconda3/envs/respai/lib/python3.8/site-packages/requests/api.py", line 119, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/home/s1bfwd/miniconda3/envs/respai/lib/python3.8/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/s1bfwd/miniconda3/envs/respai/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/s1bfwd/miniconda3/envs/respai/lib/python3.8/site-packages/requests/sessions.py", line 697, in send
    r.content
  File "/home/s1bfwd/miniconda3/envs/respai/lib/python3.8/site-packages/requests/models.py", line 831, in content
    self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
  File "/home/s1bfwd/miniconda3/envs/respai/lib/python3.8/site-packages/requests/models.py", line 756, in generate
    raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ("Connection broken: TimeoutError(110, 'Connection timed out')", TimeoutError(110, 'Connection timed out'))
```

## Reproduction Steps

```python

import requests as rq
import json

payload  = {
              "test_input": [
                {
                  "age": 61,
                  "sex": 0,
                  "bmi": 28.2,
                  "children": 0,
                  "smoker": 0,
                  "region": 3
                }
              ],
              "background_data": "/path/to/data",
              "feature_columns": [
                "age",
                "sex",
                "bmi",
                "children",
                "smoker",
                "region"
              ],
              "model_id": "model_id"
            }

headers = {
            "Content-Type": "application/json",
            "Accept": "application/json",
        }

url = "URL_to_HIT"

response = rq.post(
                    url, 
                    data=json.dumps(payload), 
                    verify=False, 
                    headers=headers
                )

json.loads(response.content)
``` 

## System Information

    $ python -m requests.help

```
{
  "chardet": {
    "version": "4.0.0"
  },
  "cryptography": {
    "version": "3.3.1"
  },
  "idna": {
    "version": "2.10"
  },
  "implementation": {
    "name": "CPython",
    "version": "3.8.5"
  },
  "platform": {
    "release": "4.15.0-142-generic",
    "system": "Linux"
  },
  "pyOpenSSL": {
    "openssl_version": "1010109f",
    "version": "20.0.1"
  },
  "requests": {
    "version": "2.25.1"
  },
  "system_ssl": {
    "version": "101010bf"
  },
  "urllib3": {
    "version": "1.26.2"
  },
  "using_pyopenssl": true
}

```

This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c).


Hi there! Thanks for opening this issue. Unfortunately, it seems this is a request for help instead of a report of a defect in the project. Please use [StackOverflow](https://stackoverflow.com) for general usage questions instead and only report defects here.