-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Closed
Labels
Description
Apache Airflow Provider(s)
http
Versions of Apache Airflow Providers
apache-airflow-providers-http==5.3.3
Apache Airflow version
3.0.4
Operating System
Astro / Debian
Deployment
Astronomer
Deployment details
No response
What happened
No response
What you think should happen instead
No response
How to reproduce
>>> import os
>>> os.environ['AIRFLOW_CONN_FOO'] = '{"conn_type": "http", "host": "foo.bar.com", "schema": "https"}'
>>> from airflow.providers.http.hooks.http import HttpHook
>>> HttpHook(http_conn_id="FOO").url_from_endpoint("baz/bop")
'baz/bop'❌ Incorrect
>>> import os
>>> os.environ['AIRFLOW_CONN_FOO'] = '{"conn_type": "http", "host": "foo.bar.com", "schema": "https"}'
>>> from airflow.providers.http.hooks.http import HttpHook
>>> h = HttpHook(http_conn_id="FOO")
>>> h.get_conn() # calls `self._set_base_url(connection)`
>>> h.url_from_endpoint("baz/bop")
'https://foo.bar.com/baz/bop'✅ correct, called self._set_base_url via get_conn (though was otherwise unnecessary)
Anything else
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct