dstandish commented on a change in pull request #6886: [AIRFLOW-6327] 
http_hook: Accept json= parameter for payload
URL: https://github.com/apache/airflow/pull/6886#discussion_r361720780
 
 

 ##########
 File path: airflow/hooks/http_hook.py
 ##########
 @@ -123,6 +127,7 @@ def run(self, endpoint, data=None, headers=None, 
extra_options=None):
             req = requests.Request(self.method,
                                    url,
                                    data=data,
+                                   json=json,
 
 Review comment:
   Though `json` is not a named argument in `get`, it does work.  Kwargs are 
passed on to `request.  See 
[here](https://github.com/psf/requests/blob/master/requests/api.py#L76).
   
   My inclination would be to just blindly forward all args (param / data / 
json) in all cases, on the basis that we should not get in the way between user 
and library, without some reason.  But you don't have to agree with me :)

----------------------------------------------------------------
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

Reply via email to