Added AxiosStrategy and ProxyStrategy Network Strategies

This commit is contained in:
Andrew Bastin
2020-01-13 23:46:31 -05:00
parent 119eb321ec
commit 61d7dcf61b
2 changed files with 21 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
import axios from "axios";
const axiosStrategy = async (req, _store) => {
const res = await axios(req);
return res;
}
export default axiosStrategy;

View File

@@ -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;