
const LabelApi = {
    async GET(Endpoint)
    {
        const Response = await fetch(`/api/${Endpoint}`, {
            method: "GET"
        });

        return Response.json();
    },
    async POST(Endpoint, BodyData = {})
    {
        const Response = await fetch(`/api/${Endpoint}`, {
            method: "POST",
            headers: {
                "Content-Type": "application/json"
            },
            body: JSON.stringify(BodyData)
        });

        return Response.json();
    },
    async PUT(Endpoint, BodyData = {})
    {
        const Response = await fetch(`/api/${Endpoint}`, {
            method: "PUT",
            headers: {
                "Content-Type": "application/json"
            },
            body: JSON.stringify(BodyData)
        });

        return Response.json();
    },
    async DELETE(Endpoint, BodyData = {})
    {
        const Response = await fetch(`/api/${Endpoint}`, {
            method: "DELETE",
            headers: {
                "Content-Type": "application/json"
            },
            body: JSON.stringify(BodyData)
        });
    }
}