I am trying to call an API call to retrieve some data. But for some reason, it is working from both Jupyter Notebook and Postman, but getting stuck in Databricks. I have tried changing the runtime version of the Databricks cluster. But it doesn’t work. Does anybody know what could be the reason?

Here is the code

import pandas as pd
import requests
import json
from datetime import datetime, timedelta


def main():
    url ="https://example.com" 
    response = requests.get(url,headers=headers,verify=True)
    resp = response.json()
        return pd.DataFrame(resp)
        return pd.DataFrame()