API connection for http domain and agent proxy

Hi all! I am looking for the best way to connect to an external source. It is inside a network so I need to use an agent proxy. The issue is, all configuration options are https based, but the endpoint is http. I tried creating a generic connector using an agent proxy and adding in the certificates there, but there was no option to add a domain - I can only do that via direct connection. I am at a loss on how to move forward and don’t know what my options are.

Also, I tried running the agent proxy connection and manually adding the url in the code (I probably did this wrong) but from what I understand for the client to work you still need to add get_https_connection() in the script. Also when I ran it, I got the error

 raise ValueError("Only single connection sources are supported.")
transforms.external.systems._redact_credentials_in_output.ValueError: Only single connection sources are supported.

Again my set up is all wrong so I don’t know where to start with troubleshooting

@external_systems(
    source=Source("<rid>")
)
# @incremental(snapshot_inputs=['ids'], require_incremental=True)
@transform(
    media_set_output=MediaSetOutput(
        "<rid>"
    )
)
def compute(ctx, source, media_set_output):
    url = "http://pseudo.com"
    client = source.get_https_connection().get_client

    id = "10771574"

    response = client.get(url + f"/{id}/AB")

    if response.status_code == 200:
        pdf_content = response.content

        with tempfile.NamedTemporaryFile() as tmp:
            tmp.write(pdf_content)
            tmp.flush()

        with open(tmp.name, "rb") as tmp_read:
            media_set_output.put_media_item(tmp_read, path=id)

To call get_https_connection(), you’ll need to make sure that your source is a REST API type source, and that it has exactly one domain specified in the settings. If you have 0 or 2+ domains, this method will throw the error you call out here.

If you need multiple domains, you may need to create multiple REST API sources to use in code

Here is a screenshot of the page where you can check if you have 0 or more than one domain specified:

Or how to connect to the api without using get_https_connection()

As far as I know REST API requires an https protocol to be used. My main issue is that it is http. Do you know a way around that issue?