You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/04/24 13:23:00 UTC

[jira] [Commented] (AIRFLOW-4295) HttpHook allows to create methods in lower case, e.g 'get' but correct usage requires method to be in upper case

    [ https://issues.apache.org/jira/browse/AIRFLOW-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16825141#comment-16825141 ] 

ASF GitHub Bot commented on AIRFLOW-4295:
-----------------------------------------

karan5291 commented on pull request #5173: AIRFLOW-4295. Make comparison of `method` case insensitive in HttpHook
URL: https://github.com/apache/airflow/pull/5173
 
 
   This PR addresses the following [Airflow Jira](https://issues.apache.org/jira/browse/AIRFLOW-4295)
   
   ### Description
   Make the method `run` in the HttpHook compare the attribute 'method' in a case insensitive way. This resolves the issue where a Httphook created with parameter `method='get'` would not be treated as a GET-request in the run method and the attribute `params`would be omitted in the Http request.
   
   ### Tests
   
   - Unit tests: `test_hook_with_method_in_lowercase`
   
 
----------------------------------------------------------------
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:
users@infra.apache.org


> HttpHook allows to create methods in lower case, e.g 'get' but correct usage requires method to be in upper case
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: AIRFLOW-4295
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-4295
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: hooks
>    Affects Versions: 1.10.2
>            Reporter: Karl Andersson
>            Assignee: Karl Andersson
>            Priority: Minor
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The HttpHook except any value for variable `method` in the constructor. However, creating a hook with method = 'get' will cause the run-function not to treat it as a GET reqest and the `params` parameter will not be used. This is confusing as the request will just omit  the `params` parameter. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)