Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse SmartHome » REST : ItemResource : only PUT to update state?
REST : ItemResource : only PUT to update state? [message #1746454] Sat, 29 October 2016 12:31 Go to next message
Karel Goderis is currently offline Karel GoderisFriend
Messages: 198
Registered: March 2014
Senior Member
I have an external system that can provides updates about it state using HTTP. It can be configured to make an ordinary GET HTTP call only.

I was wondering how such a system could be linked to ESH via REST given that the ItemResource class specifies that only PUT is supported as a method to update the state of an Item. Is there a specific reason GET is not supported, or what would be alternative strategy to include this external system in the ESH realm without having to implement a specific binding?

Re: REST : ItemResource : only PUT to update state? [message #1746484 is a reply to message #1746454] Sun, 30 October 2016 22:23 Go to previous message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
According to REST principles, GET requests must be safe methods, i.e. "they are intended only for information retrieval and should not change the state of the server".
So your system not implemented in a conform way.

There are ways to integrate it nonetheless:
1. Implement a binding in which you register a servlet that deals with the specific GET calls from your external system
2. If you do not want to do any coding, you could consider to re-(mis-)use the CMD servlet of the ClassicUI, which accepts GET requests to set states like e.g.
Previous Topic:LOG & EVENTS
Next Topic:list of channels
Goto Forum:

Current Time: Sun May 26 00:48:44 GMT 2024

Powered by FUDForum. Page generated in 0.03810 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top