Kevin Baxter
08/10/2023, 3:19 PMfunction 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)
}
Watz
08/10/2023, 4:33 PMdefine(['N/https'], function(https) {
function yourFunction() {
return { yourFunction: yourFunction }
})
Fred Pope
08/10/2023, 4:35 PMlet postData = JSON.stringify(objData);
let postHeaders = ...
let postUrl = ...
let response = <http://https.post|https.post> ({
headers: postHeaders,
url : postUrl,
body : postBody
});