Seite 1 von 1

#1 cURL , HTTP Post

Verfasst: Fr 13. Feb 2015, 07:41
von koboldo
Moin,
gibt es eine Möglichkeit solch einen Befehl aus dem Domiq zu senden ?

Code: Alles auswählen

curl --header "Content-Type: text/plain" --request PUT --data "OFF" http://192.168.100.21:8080/rest/items/MyLight/state


:confused:

#2 RE: cURL , HTTP Post

Verfasst: Fr 13. Feb 2015, 08:17
von DOMIQ-Support
Yes, you can use HTTP.get command in Base. The syntax is as follows C.HTTP.get=url, where url should be replaced with valid URL. You can pass any arguments in the url.

#3 RE: cURL , HTTP Post

Verfasst: Fr 13. Feb 2015, 08:20
von koboldo
Hallo Piotr,
http.get habe ich schon öfter benutzt, wie kann ich der url aber mitgeben das es ein put request ist und -- data "OFF" ?
:cry:

#4 RE: cURL , HTTP Post

Verfasst: Fr 13. Feb 2015, 11:06
von DOMIQ-Support
is the PUT method required by the receiver of data? If not, you can use the GET method to pass data using the query string ?name=value

#5 RE: cURL , HTTP Post

Verfasst: Fr 13. Feb 2015, 11:19
von koboldo
Yes, it is required to write things direkt to the rest api of the receiver.

#6 RE: cURL , HTTP Post

Verfasst: Fr 13. Feb 2015, 12:22
von DOMIQ-Support
Right now, it's not possible to use PUT or POST methods, but we will add it in near future. I think it will be available in the Logic and as a command.

#7 RE: cURL , HTTP Post

Verfasst: Mo 16. Feb 2015, 09:26
von koboldo
That sound´s good :thumbup:
I hope in the near future is quicker than it is with the HUE http://www.bus-profi.de/index.php/forum/topic/4932.html Integration...
since 07/13....:-/