This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
SDK2 API
Web API
Kyrcio
Member
Is it possible to return something other than JSON by adding endpoints to the REST API? I was reading and experimenting with the api.js (https://apps.developer.athom.com/tutorial-Web Api.html), but whatever I return gets wrapped in a JSON object. In my case, I would like to return plain text, preferably with a custom content-type. Is this at all possible?
Comments
https://github.com/athombv/homey/issues/1746
Maybe the web API is not supposed to be used to integrate with other HTTP-based devices? I could of course just open up another HTTP endpoint on another port, if that’s the way Athom intended it for apps.