<commit_before>import {LogManager} from 'aurelia-framework';
import {HttpClient} from 'aurelia-fetch-client';
import {Router} from 'aurelia-router';
import 'fetch';
import {Authentication} from './authentication';
import Config from '../AppConfig';

let baseUrl = Config.baseUrl;

let logger = LogManager.getLogger('openbelapi-client');

export class OpenbelapiClient {

  client;

  static inject = [Authentication, Router];
  constructor(auth, router) {
    this.auth = auth;
    this.router = router;
    let self = this;
    this.client = new HttpClient().configure(config => {
      config
        .withBaseUrl(baseUrl)
        .withDefaults({
          credentials: 'same-origin',
          headers: {
            'Accept': 'application/json',
            'X-Requested-With': 'Fetch'
          }
        })
        .rejectErrorResponses()
        .withInterceptor({
          request(req) {
            logger.debug(`Requesting ${req.method} ${req.url}`);
<commit_msg>New Accept header for OpenBEL API<commit_after>import {LogManager} from 'aurelia-framework';
import {HttpClient} from 'aurelia-fetch-client';
import {Router} from 'aurelia-router';
import 'fetch';
import {Authentication} from './authentication';
import Config from '../AppConfig';

let baseUrl = Config.baseUrl;

let logger = LogManager.getLogger('openbelapi-client');

export class OpenbelapiClient {

  client;

  static inject = [Authentication, Router];
  constructor(auth, router) {
    this.auth = auth;
    this.router = router;
    let self = this;
    this.client = new HttpClient().configure(config => {
      config
        .withBaseUrl(baseUrl)
        .withDefaults({
          credentials: 'same-origin',
          headers: {
            'Accept': 'application/hal+json',
            'X-Requested-With': 'Fetch'
          }
        })
        .rejectErrorResponses()
        .withInterceptor({
          request(req) {
            logger.debug(`Requesting ${req.method} ${req.url}`);

{'fraction_non_alphanumeric': 0.1323529411764706, 'fraction_numerical': 0.0, 'mean_word_length': 2.8236434108527133, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6528366', 'n_tokens_mistral': 570, 'n_tokens_neox': 567, 'n_words': 133}