{"size": 751, "ext": "js", "max_stars_repo_path": "static/js/mixins/http.js", "max_stars_repo_name": "zagaran/sample-silica-django-app", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "static/js/mixins/http.js", "max_issues_repo_name": "zagaran/sample-silica-django-app", "max_issues_repo_issues_event_min_datetime": "2022-03-06T00:12:23.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-06T00:12:23.000Z", "max_forks_repo_path": "static/js/mixins/http.js", "max_forks_repo_name": "zagaran/sample-django-silica-app", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 26.8214285714, "max_line_length": 89, "alphanum_fraction": 0.6071904128}
var httpMixin = {
  mounted: function () {
    if (window.csrfmiddlewaretoken) {
      this.httpManager.defaults.headers.post['X-CSRFTOKEN'] = window.csrfmiddlewaretoken;
    }
    this.httpManager.post(window.isLoggedInUrl)
  },
  data: function () {
    return {
      httpManager: axios.create()
    }
  },
  methods: {
    post(url, data) {
      var self = this;
      return this.httpManager.post(window.isLoggedInUrl).then(
        function successCallback() {
          console.log('success')
          return self.httpManager.post(url, data)
        },
        function errorCallback(response) {
          console.log(response)
          window.location.href = window.loginUrl;
          return Promise.reject(response)
        })
    }
  }
}