Merge pull request #769 from Safelite/feature/CSR-752

Feature/csr 752
This commit is contained in:
CarlNation 2022-10-07 13:50:17 -04:00 committed by GitHub
commit b248481e32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) => {