Hi all, i have a stupid question because the docs ...
# suitescript
m
Hi all, i have a stupid question because the docs are unclear to me. if you want to send multiple headers with a HTTPS.POST(). what is the correct way to pass the headers along? in SuiteAnswers one example shows
Copy code
var headerObj = {
    name: 'Accept-Language',
    value: 'en-us'
};
while another shows:
Copy code
let headers = ({
               'pwd': secureStringPWD
            });
all of the examples however show only 1 header so how would i go about sending multiple headers? i have tried
Copy code
var headers= [
            {name: "xxxxx", value:'xxxxx'},
            {name: "yyyyy", value:'yyyyy'},
            {name: "zzzzz", value:'zzzzz'}
        ];
and had no success
b
Copy code
{ xxxxx: "xxxxx", yyyyy: "yyyyy", zzzzz: "zzzzz" }
m
Thanks. that works
b
Copy code
{
    name: 'Accept-Language',
    value: 'en-us'
}
is an example of multiple headers, though honestly deceptive
m
i see what you mean. because i thought it was this header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language