[http] add POST/PUT support for state requests (#10022)
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
This commit is contained in:
@@ -19,7 +19,8 @@ It can be extended with different channels.
|
||||
| `username` | yes | - | Username for authentication (advanced parameter). |
|
||||
| `password` | yes | - | Password for authentication (advanced parameter). |
|
||||
| `authMode` | no | BASIC | Authentication mode, `BASIC`, `BASIC_PREEMPTIVE` or `DIGEST` (advanced parameter). |
|
||||
| `commandMethod` | no | GET | Method used for sending commands `GET`, `PUT`, `POST`. |
|
||||
| `stateMethod` | no | GET | Method used for requesting the state: `GET`, `PUT`, `POST`. |
|
||||
| `commandMethod` | no | GET | Method used for sending commands: `GET`, `PUT`, `POST`. |
|
||||
| `contentType` | yes | - | MIME content-type of the command requests. Only used for `PUT` and `POST`. |
|
||||
| `encoding` | yes | - | Encoding to be used if no encoding is found in responses (advanced parameter). |
|
||||
| `headers` | yes | - | Additional headers that are sent along with the request. Format is "header=value".|
|
||||
@@ -51,6 +52,7 @@ The `image` channel-type supports `stateExtension` only.
|
||||
| `commandExtension` | yes | - | Appended to the `baseURL` for sending commands. If empty, same as `stateExtension`. |
|
||||
| `stateTransformation ` | yes | - | One or more transformation applied to received values before updating channel. |
|
||||
| `commandTransformation` | yes | - | One or more transformation applied to channel value before sending to a remote. |
|
||||
| `stateContent` | yes | - | Content for state requests (if method is `PUT` or `POST`) |
|
||||
| `mode` | no | `READWRITE` | Mode this channel is allowed to operate. `READONLY` means receive state, `WRITEONLY` means send commands. |
|
||||
|
||||
Transformations need to be specified in the same format as
|
||||
@@ -155,7 +157,7 @@ The URL is used as format string and two parameters are added:
|
||||
- the transformed command (referenced as `%2$`)
|
||||
|
||||
After the parameter reference the format needs to be appended.
|
||||
See the link above for more information about the available format parameters (e.g. to use the string representation, you need to append `s` to the reference).
|
||||
See the link above for more information about the available format parameters (e.g. to use the string representation, you need to append `s` to the reference, for a timestamp `t`).
|
||||
When sending an OFF command on 2020-07-06, the URL
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user