API call in Vue.js using a Suitelet external URL as the endpoint.

let response = await fetch(
    "/suiteletexternalurl/",
    {
        method: "POST",
        headers: {
            "Content-Type": "application/json",
            name: "Accept-Language",
            value: "en-us",
        },
        body: JSON.stringify(requestBody), // request body
    }
);
return await response.json();

Leave a comment

Your email address will not be published. Required fields are marked *