Add content-type to curl (#531)
This commit is contained in:
parent
36f0192053
commit
258d4172d8
6 changed files with 42 additions and 20 deletions
|
@ -40,7 +40,8 @@ To check if the sensor is working, use again `curl` to retrieve the [current sta
|
|||
|
||||
```bash
|
||||
$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" \
|
||||
http://localhost:8123/api/states/binary_sensor.radio
|
||||
-H "Content-Type: application/json" \
|
||||
http://localhost:8123/api/states/binary_sensor.radio
|
||||
{
|
||||
"attributes": {
|
||||
"friendly_name": "Radio"
|
||||
|
@ -74,6 +75,6 @@ print(response.text)
|
|||
|
||||
```bash
|
||||
$ http -v POST http://localhost:8123/api/states/binary_sensor.radio \
|
||||
x-ha-access:YOUR_PASSWORD state=off \
|
||||
x-ha-access:YOUR_PASSWORD content-type:application/json state=off \
|
||||
attributes:='{"friendly_name": "Radio"}'
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue