-
-
Save JustinAiken/b1ceee399386cbf0bdfc to your computer and use it in GitHub Desktop.
curls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check state locally: | |
$ curl http://pi:8080/rest/items/my_item/state | |
CLOSED | |
# Set state through locally via PUT: | |
$ curl --header "Content-Type: text/plain" --request PUT --data "OPEN" http://pi:8080/rest/items/my_item/state | |
# Immediately changes | |
# Check state through myopenhab: | |
$ curl --user myuser:mypass https://my.openhab.org/rest/items/my_item/state | |
CLOSED | |
# Try to update state through myopenhab: | |
$ curl --user myuser:mypass --header "Content-Type: text/plain" --request PUT --data "CLOSED" https://my.openhab.org/rest/items/my_item/state | |
# Request times out | |
# In openhab log I see: '2015-05-06 19:29:50.940 [ERROR] [.myopenhab.internal.MyOHClient] - Unsupported request method PUT' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment