<commit_before>import Vuex from 'vuex'
import axios from 'axios'
import VueAxios from 'vue-axios'
import HalJsonVuex from 'hal-json-vuex'
import lang from './lang'

class StorePlugin {
  install (Vue, options) {
    Vue.use(Vuex)

    store = new Vuex.Store({
      modules: {
        lang
      },
      strict: process.env.NODE_ENV !== 'production'
    })

    axios.defaults.withCredentials = true
    axios.defaults.baseURL = window.environment.API_ROOT_URL
    Vue.use(VueAxios, axios)

    let halJsonVuex = HalJsonVuex
    if (typeof halJsonVuex !== 'function') {
      halJsonVuex = HalJsonVuex.default
    }
    apiStore = halJsonVuex(store, axios, { forceRequestedSelfLink: true })
    Vue.use(apiStore)
  }
}
<commit_msg>Add the Accept header to all API calls<commit_after>import Vuex from 'vuex'
import axios from 'axios'
import VueAxios from 'vue-axios'
import HalJsonVuex from 'hal-json-vuex'
import lang from './lang'

class StorePlugin {
  install (Vue, options) {
    Vue.use(Vuex)

    store = new Vuex.Store({
      modules: {
        lang
      },
      strict: process.env.NODE_ENV !== 'production'
    })

    axios.defaults.withCredentials = true
    axios.defaults.baseURL = window.environment.API_ROOT_URL
    axios.defaults.headers.common.Accept = 'application/hal+json'
    Vue.use(VueAxios, axios)

    let halJsonVuex = HalJsonVuex
    if (typeof halJsonVuex !== 'function') {
      halJsonVuex = HalJsonVuex.default
    }
    apiStore = halJsonVuex(store, axios, { forceRequestedSelfLink: true })
    Vue.use(apiStore)
  }
}

{'fraction_non_alphanumeric': 0.10996784565916398, 'fraction_numerical': 0.0, 'mean_word_length': 3.182795698924731, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5431707', 'n_tokens_mistral': 562, 'n_tokens_neox': 557, 'n_words': 119}