uranusjr commented on code in PR #33234:
URL: https://github.com/apache/airflow/pull/33234#discussion_r1288183391
##########
airflow/providers/http/hooks/http.py:
##########
@@ -340,31 +340,18 @@ async def run(
if headers:
_headers.update(headers)
- if self.base_url and not self.base_url.endswith("/") and endpoint and
not endpoint.startswith("/"):
- url = self.base_url + "/" + endpoint
- else:
- url = (self.base_url or "") + (endpoint or "")
+ url = "/".join([(self.base_url or "").rstrip("/"), (endpoint or
"").lstrip("/")])
Review Comment:
```suggestion
url = f'{(self.base_url or "").rstrip("/")}/{(endpoint or
"").lstrip("/")}'
```
(I think?)
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]