jeudi 3 décembre 2020

Solutions for adding bi-directional web api to winforms application

So I am hoping this is the right place to ask such a question. I have an application that interacts with a piece of hardware via USB HID. This application has served its purpose well but we have a constant need to add little 'script' like pieces of code to it to automate various tasks.

What we have decided to try is adding a web based API to the application that we can send commands to and receive events from. The idea then is to use GET or PUSH requests in something like python to create these simple little device test scripts as we need them.

The questions I have are around whether this is even the right way to go about it or is there something better? And if this is the right way to go about it, how do we handle the events that come back from the device that need to be sent to the script somehow? I understand you can use things like webhooks or SSE but I am not really familiar enough with these to make a good choice on what to use in this instance.

At present I am looking at things like OWIN for an internal web server but I could be completely off track. Have done a lot of goolge'ing on this and I am not really seeing a clear best or right way. Any suggestions appreciated.




Aucun commentaire:

Enregistrer un commentaire