mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-24 17:57:14 +00:00
Update rest_command.markdown configuration (#7122)
* Update rest_command.markdown
* Update rest_command.markdown
* Update rest_command.markdown
* Update rest_command.markdown
* Update rest_command.markdown
* ✏️ Tweak
This commit is contained in:
parent
f505b2853b
commit
bc71516c56
@ -27,17 +27,47 @@ rest_command:
|
|||||||
url: 'http://example.com/'
|
url: 'http://example.com/'
|
||||||
```
|
```
|
||||||
|
|
||||||
Configuration variables:
|
{% configuration %}
|
||||||
|
service_name:
|
||||||
- **[service_name]** (*Required*): The name used to expose the service. E.g., in the above example, it would be `rest_command.example_request`.
|
description: The name used to expose the service. E.g., in the above example, it would be 'rest_command.service_name'.
|
||||||
- **url** (*Required*): The URL (support template) for sending request.
|
required: true
|
||||||
- **method** (*Optional*): HTTP method to use (`get`, `post`, `put`, or `delete`). Defaults to `get`.
|
type: map
|
||||||
- **headers** (*Optional*): The headers for the requests.
|
keys:
|
||||||
- **payload** (*Optional*): A string/template to send with request.
|
url:
|
||||||
- **username** (*Optional*): The username for HTTP authentication.
|
description: The URL (supports template) for sending request.
|
||||||
- **password** (*Optional*): The password for HTTP authentication.
|
required: true
|
||||||
- **timeout** (*Optional*): Timeout for requests. Defaults to 10 seconds.
|
type: [string, template]
|
||||||
- **content_type** (*Optional*): Content type for the request.
|
method:
|
||||||
|
description: HTTP method to use (get, post, put, or delete).
|
||||||
|
required: false
|
||||||
|
default: get
|
||||||
|
type: string
|
||||||
|
headers:
|
||||||
|
description: The headers for the requests.
|
||||||
|
required: false
|
||||||
|
type: list
|
||||||
|
payload:
|
||||||
|
description: A string/template to send with request.
|
||||||
|
required: false
|
||||||
|
type: [string, template]
|
||||||
|
username:
|
||||||
|
description: The username for HTTP authentication.
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
password:
|
||||||
|
description: The password for HTTP authentication.
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
timeout:
|
||||||
|
description: Timeout for requests in seconds.
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
defaut: 10
|
||||||
|
content_type:
|
||||||
|
description: Content type for the request.
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
{% endconfiguration %}
|
||||||
|
|
||||||
## {% linkable_title Examples %}
|
## {% linkable_title Examples %}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user