<commit_before>import {
  createFetch,
  base,
  method,
  header,
  parseJSON
} from 'http-client';

export function configureClient(options = {}) {
  if (typeof options === 'string') {
    options = {
      base: options
    };
  }

  options = {
    headers: {
      accept: 'application/vnd.api+json',
      type: 'application/vnd.api+json',
    },
    body: {},
    method: 'GET',
    ...options
  };

  options.method = options.method.toUpperCase();

  return createFetch(
    base(options.base),
    method(options.method),
    header('Accept', options.headers.accept),
    header('Content-Type', options.headers.type),
    parseJSON('jsonData')
  );
}
<commit_msg>enhancement: default `base` to http.<commit_after>import {
  createFetch,
  base,
  method,
  header,
  parseJSON
} from 'http-client';

export function configureClient(options = {}) {
  if (typeof options === 'string') {
    options = {
      base: options
    };
  }

  options = {
    base: '//',
    headers: {
      accept: 'application/vnd.api+json',
      type: 'application/vnd.api+json',
    },
    body: {},
    method: 'GET',
    ...options
  };

  options.method = options.method.toUpperCase();

  return createFetch(
    base(options.base),
    method(options.method),
    header('Accept', options.headers.accept),
    header('Content-Type', options.headers.type),
    parseJSON('jsonData')
  );
}

{'fraction_non_alphanumeric': 0.16052060737527116, 'fraction_numerical': 0.0, 'mean_word_length': 2.8876404494382024, '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': '6051081', 'n_tokens_mistral': 449, 'n_tokens_neox': 439, 'n_words': 83}