mirror of
https://github.com/esphome/esphome.git
synced 2025-07-28 14:16:40 +00:00
[http_request] Fix request headers (#8644)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
a31a5e74bd
commit
b5bdfb3089
@ -295,8 +295,8 @@ async def http_request_action_to_code(config, action_id, template_arg, args):
|
||||
for key in json_:
|
||||
template_ = await cg.templatable(json_[key], args, cg.std_string)
|
||||
cg.add(var.add_json(key, template_))
|
||||
for key in config.get(CONF_REQUEST_HEADERS, []):
|
||||
template_ = await cg.templatable(key, args, cg.std_string)
|
||||
for key, value in config.get(CONF_REQUEST_HEADERS, {}).items():
|
||||
template_ = await cg.templatable(value, args, cg.const_char_ptr)
|
||||
cg.add(var.add_request_header(key, template_))
|
||||
|
||||
for value in config.get(CONF_COLLECT_HEADERS, []):
|
||||
|
Loading…
x
Reference in New Issue
Block a user