Open paulvanbladel opened 5 years ago
Maybe @pavsaund can answer this?
Interesting point. We actually used Fetch here to avoid reliance on any particular framework but it's a valid point that other well-know libraries should be supported.
It's very simple at this stage where the coordinators just handle communication with the server. I don't think we would want to come up with an abstraction that tries to hide the differences, rather we'd come up with different command/query coordinator implementations.
What would be interesting is a centralized config where I could say something like every request to the server should have this config (be a post, add these headers/bearer tokens, etc.).
The javascript part of this is quite immature. We are going to hugely improve it. For example, building as much of the validation and security into the proxies as we can, controls to bind commands and handle validation messages and errors and a "CanExecute" flag.
Good to have the feedback.
In the web projects npm modules, I suppose that the @dolittle/commands and queries material is supposed to be javascript framework agnostic. It uses fetch for the http communication. Fetch is typically used in aurelia but in vue-js there is a strong preference for Axios meaning that many vue-js plugins have a strong dependency on axios.
Can the http request be easily augmented with application specific headers? (e.g. authentication header with bearer token)