SMACC2 icon indicating copy to clipboard operation
SMACC2 copied to clipboard

[FEATURE REQUEST] Add a client to perform web requests

Open yassiezar opened this issue 2 years ago • 2 comments

It would be helpful to have a client that is able to deal with HTTP/S web requests in cases where robots need to be in contact with an remote server to receive commands or data. This can be similar to the existing subscriber clients which have onMessageReceived() callbacks and can be triggered from client behaviours. The major issues I expect are

  1. how to elegantly handle state changes during long-running requests where the original request caller may no longer be available, and
  2. how to avoid adding large amounts of additional external dependencies.

Are there any plans to add such functionality? I already have something we use which I can port and refine for use in the general library. However, I'm not sure what SMACC's policy on external dependencies is. We're currently using the CPR library for C++ and this JSON library to form the bodies, but if that's too much, I'll have to look into using the libjson and cURL libraries or something more accessible to users instead.

Any insights or ideas would be helpful.

yassiezar avatar Mar 29 '22 16:03 yassiezar