karan5291 commented on a change in pull request #5173: AIRFLOW-4295. Make
comparison of `method` case insensitive in HttpHook
URL: https://github.com/apache/airflow/pull/5173#discussion_r281528491
##########
File path: airflow/hooks/http_hook.py
##########
@@ -108,13 +108,13 @@ def run(self, endpoint, data=None, headers=None,
extra_options=None):
url = (self.base_url or '') + (endpoint or '')
req = None
- if self.method == 'GET':
+ if self.method.upper() == 'GET':
# GET uses params
req = requests.Request(self.method,
url,
params=data,
headers=headers)
- elif self.method == 'HEAD':
+ elif self.method.upper() == 'HEAD':
Review comment:
Updated PR as per your suggestion. Logic is now in constructor.
----------------------------------------------------------------
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