I'm passing the body parameters this way:
body: JSON.stringify(parameters),
where parameters is structured like parameters.name = 'name', ...
I would like to accomplish the same with the headers but the key (of the key/value) contains -.
headers: {
'X-Public-App-Authentication': 'Token ' + token,
'content-type': 'application/json'
},
how can I pass this header as a parameter so I can just write headers: JSON.stringify(heads), ?