commit
b248481e32
1 changed files with 1 additions and 5 deletions
|
|
@ -9,16 +9,12 @@ import { headerKeys } from "@/constants/header-keys";
|
|||
export default {
|
||||
callHttpClient({ method, endpoint, payload, logApiCall = true }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
var cfDistroUrl = applicationConfig.CONSUMER_CF_DISTRO;
|
||||
const cfDistroUrl = applicationConfig.CONSUMER_CF_DISTRO;
|
||||
const payloadAndAnalyticsData = Object.assign({}, payload, { AppName: "FixMyGlass" });
|
||||
const headers = {
|
||||
[headerKeys.EXPERIMENT]: JSON.stringify(store.getters.experimentSettings)
|
||||
}
|
||||
|
||||
if (endpoint.toLowerCase().includes("/order/")){
|
||||
cfDistroUrl = "https://localhost:44346";
|
||||
}
|
||||
|
||||
axios({ method: method, url: cfDistroUrl + endpoint, data: payloadAndAnalyticsData, crossDomain: true, responseType: {}, headers: headers })
|
||||
.then((response) => {
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue