import axios from "axios";
let axiosInstance = axios.create({
  // baseURL: "http://localhost:4200/",
  // baseURL: "http://localhost:8080/",
  // withCredentials: true,
  headers: {
    "Access-Control-Allow-Origin": "*",
    "Content-Type": "application/json",
  },
});

// eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2MmQ4ZmJlN2IxOTQzNTZjZDQ5YmJjNTkiLCJyb2xlIjoiY29tcGFueS11c2VyIiwibmFtZSI6IkJvb2sgVXNlciAxIiwiZW1haWwiOiJib29rdXNlcjFAZ21haWwuY29tIiwiaWF0IjoxNjU5MDc0NTAyfQ.A9Mzv2DsDaIhjtFocnUf0pGE4HzUz9eHJk2VpzujJpw

// axiosInstance.defaults.headers.post["Content-Type"] = "application/json";
// axiosInstance.interceptors.response.use(
//   response => successHandler(response),
//   error => errorHandler(error)
// );
const errorHandler = (error) => {
  return Promise.reject({ ...error });
};

const successHandler = (response) => {
  return response;
};
export default axiosInstance;
