How to send username, password (HTTP basic authentication) in Rest API's POST request?

How to send username, password (HTTP basic authentication) in Rest API’s POST request?

If I pass like below

auth: {
“abc”: “xyz”
}

gettting error(runtime) like

“httpcall_client.js:62 Uncaught TypeError: options.auth.indexOf is not a function”

If I pass like this

auth: {
“abc:xyz”
}
getting error(syntax) like

" Errors prevented startup:

While processing files with ecmascript (for target web.browser):
client/events/mainScreenEvents.js:55:4: Unexpected token (55:4)

Your application has errors. Waiting for file change."

1 Like

Issue solved,
auth is a string, I missed a point in doc.
so, worked after giving
auth: “username:password”

1 Like