feluelle commented on a change in pull request #4455: [AIRFLOW-3519] Fix 
example http operator
URL: https://github.com/apache/airflow/pull/4455#discussion_r245789254
 
 

 ##########
 File path: airflow/example_dags/example_http_operator.py
 ##########
 @@ -92,7 +92,7 @@
     http_conn_id='http_default',
     endpoint='',
     request_params={},
-    response_check=lambda response: True if "Google" in response.content else 
False,
 
 Review comment:
   Yes. `response.content` is a byte string and not a decoded string like 
`response.text`.
   So either `b"Google" in response.content` would work or `"Google" in 
response.text` . See these Jira tickets: 
https://issues.apache.org/jira/browse/AIRFLOW-3519 and 
https://issues.apache.org/jira/browse/AIRFLOW-450

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to