Content-type in pre-request script over written as text/plain

I was writing a pre-request script for my collection whose response will be passed in rest of the collection. But content-type header is getting over written to text/plain. Can you please suggest how to resolve this, below is my code

url: pm.variables.get(‘MyVariable’),
method: ‘POST’,
headers: {
‘content-type’: ‘application/json’,
body: {
mode: ‘raw’,
raw: JSON.stringify({
username: ‘myUserName’,
password: ‘myPwd’
}, function (err, response) {

It’s ‘header’, not ‘headers’.

I tried sending one as headers to Postman Echo and it does indeed change it to text/plain.

The following is an working example sending to Postman Echo.

const options = {
    url:  '', 
    method: 'POST',
    header: {
        'Content-Type': 'application/json'
    body: {
        mode: 'raw',
        raw: JSON.stringify({'username' : 'myUserName', 'password' :'myPwd'})

pm.sendRequest(options, function (err, res) {
    if (err) {
    } else {
        pm.test("Status code is 200", () => {
        let resJson = res.json();

It worked, Thanks for the correction