[Feature] Provide well configured axios instance to pre-/post custom scripts
Before running any request a complex logic retrieving proxy and ca-configuration is done out of the global and collection level configuration.
When I use axios inside a custom javascript I can't benefit of this nice pre-work configuring axios.
It would be grateful to have a mechanism to benefit of the pre-configured axios instance.
E.g. get the instance via require.
const axiosinstance = require('axiosintance');
or get access to the instance via bru-Object
bru.getAxiosInstance();
Wouldn't it be better to provide something similar as pm.sendRequest() in Postman. So e.g. bru.sendRequest() and it would be wrapper around Axios request with everything like proxy, certs, ... configured.
This would be more stable for example if hypothetically Bruno will be changed in the future and Axios will be internally changed to some other HTTP client then it does not affect thousands of user's collections.
Any progress on this? Now we're forced to do something like this in pre/post scripts, which is a bit awkward. Would be much nicer of Bruno automagically configured the bru object with the CA settings from the configuration settings.
const rootca = fs.readFileSync(os.homedir + '/wherever/ROOTCA.pem'); const httpsAgent = new https.Agent({ ca: rootca });
bru.sendRequest({ httpsAgent: httpsAgent, etc... });