```function loginRequest() { var apiUrl ...
# suitescript
k
Copy code
function loginRequest() {


        var apiUrl = "<https://clientapiqa.brandmanager360.com/>"

        var objData = {
            "username": "netsuite api_12034",
            "password": "--password--",
            "grant_type": "password"
        };
        let loginResponse = <http://https.post|https.post>({
            url: apiUrl+"Token",
            headers:{"Content-Type" : "application/x-www-form-urlencoded",
                "Cache-Control" : "no-cache"},
            body: objData
        });

        console.log(loginResponse)

}
w
Is this the full client script file? If it is, you need to load the https module
Copy code
define(['N/https'], function(https) {

function yourFunction() {

    return { yourFunction: yourFunction }

})
f
You likely need to stringify your post body. So then :
Copy code
let postData = JSON.stringify(objData);
let postHeaders = ...
let postUrl = ...

let response = <http://https.post|https.post> ({
    headers: postHeaders, 
    url : postUrl, 
    body : postBody
});