I can't find a single example of making a <https.p...
# suitescript
c
I can't find a single example of making a https.post call with basic credentials in the NS docs
m
I believe you should manually add proper header, like this
Copy code
<http://http.post|http.post>({
  url: '_YOUR_URL_',
  body: _YOUR_BODY_,
  headers: {
    'Authorization': 'Basic _BASE64_ENCODED_USERNAME_AND_PASSWORD_SEPARATED_WITH_COLON_'
  }
})
c
How would that be structured if including multiple headers?
Untitled
m
Copy code
headers: {
    'Authorization': 'Basic _BASE64_ENCODED_USERNAME_AND_PASSWORD_SEPARATED_WITH_COLON_',
    'Content-Type': 'application/json',
    'Header_3: 'value_3'
  }
The example in the documentation seems to be wrong
c
Yeah it looks like it
thanks