const baseurl = "http://49.234.214.168:8080/hhd-pat/";
import axios from "axios";

axios.interceptors.response.use(
  function (response) {
    return response;
  },
  function (error) {
    return Promise.reject(error);
  }
);
export const $http = function (method, url, data) {
  return axios({
    method,
    url: baseurl + url,
    data,
    withCredentials: true,
  });
};

export default { baseurl, $http };
