I am trying to create a new topic via Node.js API by sending the following payload :
{ title: 'topic:329201',
raw: 'topic-description:32920111948',
created_at: '2019-05-08',
api_key:
'2371b6549b0c3aeb1f12e49c22db5f25fb1f8ca740619e5304f12f4d29896097',
api_username: 'cb1'
}
I am hitting the API via HTTP module of node with the following options :
{ host: '13.127.14.24',
port: '3000',
path: '/posts',
method: 'POST',
headers:
{ 'content-type': 'application/x-www-form-urlencoded',
'content-length': 194,
Accept: '*/*',
Connection: 'keep-alive' }
}
But I am getting [“BAD CSRF”] in body. Can anyone help.