import axios from "axios";
import {timeout} from "./config.js";
const requestInstance = axios.create({
    baseURL:import.meta.env.VITE_BASE_API,
    timeout,
    method:"post",
    headers:{
        "auth-sysId":import.meta.env.VITE_SYSTEM_ID
    },

})

const requestInstance_Map_token = axios.create({
    baseURL:import.meta.env.VITE_OPEN_API,
    timeout,
    method:"post",
    headers:{
        "auth-sysId":import.meta.env.VITE_SYSTEM_ID
    },
})

const requestInstance_Service_token = axios.create({
    baseURL:import.meta.env.VITE_OPEN_API,
    timeout,
    method:"get",
    headers:{
        "auth-sysId":import.meta.env.VITE_SYSTEM_ID
    },
})

const requestPost = axios.create({
    baseURL:import.meta.env.VITE_BASE_API,
    timeout,
    method:"post",
    headers:{
        "auth-sysId":import.meta.env.VITE_SYSTEM_ID
    },
})

const requestGet = axios.create({
    baseURL:import.meta.env.VITE_BASE_API,
    timeout,
    method:"get",
    headers:{
        "auth-sysId":import.meta.env.VITE_SYSTEM_ID
    },
})

 const requestInstance_Get = axios.create({
    baseURL:import.meta.env.VITE_BASE_API,
    timeout,
    method:"get",
    withCredentials:true,
    headers:{
        "auth-sysId":import.meta.env.VITE_SYSTEM_ID
    }
})

export {
    requestInstance,
    requestInstance_Map_token,
    requestInstance_Service_token,
	requestPost,
	requestGet,
    requestInstance_Get
}


