I\'ve tried to use fetch to call from backend using react, without libs (such as Axios). So I created this function:
export function api(url, method, body, i
For me, i had an invalid character in a key of the header object. I accidentally included the ":" and this throws the error described. Really difficult to visually see in the chrome console. Hope it helps someone.
{ 'Authorization:':'Bearer etc...' }