Closed Janpot closed 2 years ago
+1, sounds like a great and important feature, it would also easily allow for a lot of integrations
still, maybe having a simple, limited, non-bloated way of making REST requests wouldn't be bad either
Interesting! As it has the potential to cover much of user's expectations around customization. It seems some WRITE use cases would also be possible through this.
Sufficiently implemented by https://github.com/mui/mui-toolpad/pull/641 and follow-up PRs
The REST datasource is on a pathway of configuration bloat. There's just so many possible combinations of urls, path parameters, headers, query parameters, authentication, method, preprocessing, postprocessing, error handling,... as well as, no clear way to combine or chain requests.
We should allow the user to express their rest calls in plain javascript. e.g. allow the user to write queries of the form:
This would execute on the server and user will be presented with UI where they can define input to be passed from the page to the server function. The user would have full control over how urls are created, pre/post-processing, chaining multiple requests. Error handling,...
We can allow them to set up authentication headers per origin and have the server automatically use them when making requests.
We can also add a wizard that asks for a few basic parameters and generates the function code to start from.
This would make the following tickets obsolete:
benchmark:
Todo: evaluate methods of running untrusted code securely on the server side:
esbuild
)