mik-laj commented on a change in pull request #5239: [WIP][AIRFLOW-2910] Add
HTTP URI support
URL: https://github.com/apache/airflow/pull/5239#discussion_r288441099
##########
File path: airflow/models/connection.py
##########
@@ -128,6 +128,27 @@ def __init__(
def parse_from_uri(self, uri):
uri_parts = urlparse(uri)
+ if uri_parts.scheme in ['http', 'https']:
+ self._parse_from_http_uri(uri)
+ else:
+ self._parse_from_airflow_uri(uri)
+
+ def _parse_from_http_uri(self, uri):
+ self.conn_type = 'http'
+ url_parts = urlparse(uri)
+ netloc = "%s:%s" % (url_parts.hostname, url_parts.port) if
url_parts.port else url_parts.hostname
+ # The fragment is used to store extra configuration. The HTTP client
never uses fragments, so
Review comment:
Yes. Of course. First, I wanted to determine the implementations.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services