Closed empyfree closed 2 years ago
Leaving this here instead of transferring to the generic HTTP module because we will need to modify the core REST library if we want to support changing the header type. It is application/json for GET, POST, and PUT by default. I recommend we implement a drop-down and at least include:
I don't see reason to add them all.
I support this. It would allow us to control OpenHAB from companion.
I would support this as well. I'm currently replicating the ProPresenter Scoreboard web remote in companion and while I'd love to create it as a module and submit it for everyone, it needs to send form data in a POST and not JSON (again mimicking the web remote because the API doesn't contain the same functions). Right now I'm limited to putting curl commands in the run shell path button action to make them talk.
Yes, it would be really nice, if we have at least two options in connection-settings for generic http:
Base URL: http://openhab.local/rest/items/ Content-Type: text/plain
Default-Value for this Content-Type field could stay "application/json" but with a possibility to change it. This could be a minimal solution to support openHAB.
These PR's should take care of it:
https://github.com/bitfocus/companion-module-generic-http/pull/18
and #1790
I implemented this. With help from @estilles :)
Thanks @josephdadams this few lines transformed my Streamdeck to a complete smarthome interface. :)
Describe the feature Update the Generic HTTP module to include some useful options and functionality.
As per Facebook conversation with @josephdadams the current HTTP module is pre configured to send “Application/JSON” type headers.
https://www.facebook.com/groups/companion/permalink/2558279757723692/
It would be nice to have options here to change the format of the request.
I do not know enough about the varying types of HTTP requests to suggest what the options should be!?
Is this platform dependent (windows, mac, ..)? I do not believe so.
Usecases Simple and direct control of IFTTT webhooks service. My use case was to remotely turn on and off a fan as part of a sensory projection show (for my daughter!).