mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-15 05:16:49 +00:00
Documents rest_command header templates usage (#10213)
This commit is contained in:
parent
b6d2938dcc
commit
6bcc9f7aea
@ -31,7 +31,7 @@ service_name:
|
|||||||
url:
|
url:
|
||||||
description: The URL (supports template) for sending request.
|
description: The URL (supports template) for sending request.
|
||||||
required: true
|
required: true
|
||||||
type: [string, template]
|
type: template
|
||||||
method:
|
method:
|
||||||
description: HTTP method to use (get, patch, post, put, or delete).
|
description: HTTP method to use (get, patch, post, put, or delete).
|
||||||
required: false
|
required: false
|
||||||
@ -44,7 +44,7 @@ service_name:
|
|||||||
payload:
|
payload:
|
||||||
description: A string/template to send with request.
|
description: A string/template to send with request.
|
||||||
required: false
|
required: false
|
||||||
type: [string, template]
|
type: template
|
||||||
username:
|
username:
|
||||||
description: The username for HTTP authentication.
|
description: The username for HTTP authentication.
|
||||||
required: false
|
required: false
|
||||||
@ -83,6 +83,7 @@ rest_command:
|
|||||||
headers:
|
headers:
|
||||||
authorization: !secret rest_headers_secret
|
authorization: !secret rest_headers_secret
|
||||||
accept: 'application/json, text/html'
|
accept: 'application/json, text/html'
|
||||||
|
user-agent: 'Mozilla/5.0 {{ useragent }}'
|
||||||
payload: '{"profile":{"status_text": "{{ status }}","status_emoji": "{{ emoji }}"}}'
|
payload: '{"profile":{"status_text": "{{ status }}","status_emoji": "{{ emoji }}"}}'
|
||||||
content_type: 'application/json; charset=utf-8'
|
content_type: 'application/json; charset=utf-8'
|
||||||
verify_ssl: true
|
verify_ssl: true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user