aiocoap
aiocoap copied to clipboard
aiocoap-client interactive mode: focus, usability
Seeing how often coap-shell is recommended these days, I think there are improvements to the already existing --interactive mode of aiocoap-client that it can benefit from:
-
Allow prefixing things with
get,post,putetc. The current command line processing is "just like aiocoap without the command name", which is kind of OK but also unusual compared with common interactive tools.Proposed change: Have an implicit
-min the front if the first word isget,putor another method in any capitalization. -
Have a concept of the current URI. Running any command sets that to what was requested (or the Location if one was returned, with appropriate debug output).
The URL argument is, when such a current point is available, relative to there. When a relative reference is used, it should be printed in full before executing the request.
-
Adding something
cd-ish (possibly "goto"?) might be a suitable addition -- change the current value but don't do anything with it; could also become the default in an incompatible change (then you could just enter..and in the next lineget). -
When dissecting anything with links, these could receive annotations in pretty-printing that allow going there easily (like
[1] </resource-lookup/>;rt="...", [2]</endpoint-lookup/>...) ... or these could be shown like footnotes in the end.
Not sure all of these are a good idea, feedback would be appreciated.
Some input on this is captured in a RIOT forum thread, especially from @mcr.