The 'request' package is node.js only, but there are plenty of other request type packages, like 'got' etcetera
Now, for creating custom (Dojo) widgets (not the plugin widgets based on React, although it would be possible there as well) there is a way to include npm packages in your widget.
Use my ES6 setup for widgets: https://github.com/JelteMX/generator-mendix-widget, which will scaffold a widget using this setup: https://github.com/JelteMX/widget-base. This widget is completely written in ES6 and has the ability to include packages from the NPM registry.
For example, I created a JSON Editor widget, which included the jsoneditor package from NPM
Hi, I some how got it working, but I’m not able to copy template file and use it in the widget. Can you give me some headsup?