Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
Added AxiosStrategy and ProxyStrategy Network Strategies
Andrew Bastin61d7dcf61b2f
diff --git a/functions/strategies/AxiosStrategy.js b/functions/strategies/AxiosStrategy.jsnew file mode 100644index 000000000..5c8020784--- /dev/null+++ b/functions/strategies/AxiosStrategy.js@@ -0,0 +1,8 @@+import axios from "axios";++const axiosStrategy = async (req, _store) => {+ const res = await axios(req);+ return res;+}++export default axiosStrategy;diff --git a/functions/strategies/ProxyStrategy.js b/functions/strategies/ProxyStrategy.jsnew file mode 100644index 000000000..9cac6f47d--- /dev/null+++ b/functions/strategies/ProxyStrategy.js@@ -0,0 +1,13 @@+import axios from "axios";++const proxyStrategy = async (req, store) => {+ const proxyRes = await axios.post(+ store.state.postwoman.settings.PROXY_URL ||+ "https://postwoman.apollotv.xyz/",+ req+ );++ return proxyRes.data;+}++export default proxyStrategy;