Can you try typing it as HeadersInit
?
const requestHeaders: HeadersInit = new Headers();
requestHeaders.set('Content-Type', 'application/json');
const responseLogin = await fetch('URL', {
method: 'POST',
headers: requestHeaders,
body: requestBody
});
If not, can you show the error you are getting when you are initiating it with the Headers() constructor, you showed in the question?