irudson commented on a change in pull request #11555:
URL: https://github.com/apache/airflow/pull/11555#discussion_r505812032
##########
File path: airflow/providers/http/operators/http.py
##########
@@ -64,6 +64,7 @@ class SimpleHttpOperator(BaseOperator):
'data',
'headers',
]
+ template_fields_renderers = {'headers': 'json', 'data': 'py'}
Review comment:
Hi @turbaszek ,
Please find attached screenshots of template_fields_renderers dict and
rendered template for both data & header:
<img width="724" alt="field_description"
src="https://user-images.githubusercontent.com/40456773/96181098-c05cfb80-0f33-11eb-9b61-f5a98e05e383.png">
<img width="873" alt="rendered_template"
src="https://user-images.githubusercontent.com/40456773/96181106-c2bf5580-0f33-11eb-9aa1-5330ff98de36.png">
The data is based on http dag example - which was:
```
data=json.dumps({"priority": 5}),
```
thus it is a dictionary/json - but it wouldn't have to be so `py` lexer seem
like good choice.
----------------------------------------------------------------
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]