mirror of
https://github.com/esphome/esphome.git
synced 2026-02-18 15:35:59 -07:00
[http_request] Pass trigger variables into on_response/on_error (#11464)
This commit is contained in:
@@ -31,6 +31,20 @@ esphome:
|
||||
request_headers:
|
||||
Content-Type: application/json
|
||||
body: "Some data"
|
||||
- http_request.post:
|
||||
url: https://esphome.io
|
||||
request_headers:
|
||||
Content-Type: application/json
|
||||
json:
|
||||
key: value
|
||||
capture_response: true
|
||||
on_response:
|
||||
then:
|
||||
- logger.log:
|
||||
format: "Captured response status: %d, Body: %s"
|
||||
args:
|
||||
- response->status_code
|
||||
- body.c_str()
|
||||
|
||||
http_request:
|
||||
useragent: esphome/tagreader
|
||||
|
||||
Reference in New Issue
Block a user