"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const config = require("./config.js");
const useHttp = (dataHandler) => {
  const http = config.default();
  if (dataHandler) {
    http.interceptors.response.use(dataHandler, (error) => {
      return Promise.reject(error);
    });
  }
  return http;
};
exports.default = useHttp;
