mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-21 16:27:19 +00:00
Add headers to REST command response documentation (#39938)
This commit is contained in:
parent
4be1d24940
commit
c6775c1b25
@ -100,7 +100,8 @@ rest_command:
|
||||
|
||||
### Using REST command Response in automations
|
||||
|
||||
REST commands provide an action response in a dictionary containing `status` (containing the HTTP response code) and `content` containing the response body as text or JSON. This response can be accessed in automations using [`response_variable`](/docs/scripts/perform-actions#use-templates-to-handle-response-data).
|
||||
REST commands provide an action response in a dictionary containing `status` (containing the HTTP response code), `content` containing the response body as text or JSON and `headers` containing the response headers.
|
||||
This response can be accessed in automations using [`response_variable`](/docs/scripts/perform-actions#use-templates-to-handle-response-data).
|
||||
|
||||
The following example shows how the REST command response may be used in automations. In this case, checking the [Traefik API](https://doc.traefik.io/traefik/operations/api/) for errors.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user